Reading Writing ".DS_Store" Files (original) (raw)

8.15

A ".DS_Store" file is a metadata file on Mac OS X that holds information about folder and icons as viewed and manipulated in Finder. One common reason to manipulate ".DS_Store" files is to create a nice-looking disk image for a Mac OS X installer.

".DS_Store" reading and writing is based on a reverse-engineered description of the file format [DS_Store].

1 ".DS_Store" Files and Entries🔗ℹ

Reads the ".DS_Store" file at path returning a list of store items.

Writes dses to the ".DS_Store" file atpath, replacing the file’s current content.

#:transparent)
path : (or/c path-element? 'same)
id : symbol?
type : (or/c 'long 'shor 'bool 'type 'ustr 'blob)

Represents a entry in a ".DS_Store" file. A".DS_Store" file typically has multiple entries for a single file or directory in the same directory as the ".DS_Store".

The path should be 'same only for a volume root directory; information about a directory is otherwise recorded in its parent directory’s ".DS_Store" file.

The id symbols should each have four ASCII characters. See the ".DS_Store" format description [DS_Store] for more information id and type values.

The data field long should be an exact integer for'long and 'shor types, a boolean for the'bool type, a 4-character ASCII symbol for the 'typetype, a string for the 'ustr type, and either a byte string,iloc, or fwind for the 'blob type.

Represents an icon location for an 'Iloc entry.

Represent a window location for a 'fwi0 entry. Themode field should have four ASCII characters, and recognizedmodes include 'icnv, 'clmv, and'Nlsv.

2 Finder Aliases🔗ℹ

A 'pict entry in a ".DS_Store" file references a file through a Finder alias.

Constructs a byte string to represent a Finder alias but using the"CoreFoundation" library on Mac OS X.

Bibliography🔗ℹ