Important: The information in this document is obsolete and should not be used for new development.
Identifying Files and Directories
The hierarchical arrangement of files and directories allows you to identify a file or directory uniquely by providing just three pieces of information: its volume reference number, its parent directory ID, and its name within that parent directory. The system software lets you specify these three items together in a file system specification record, defined by theFSSpecdata type:
TYPE FSSpec = {file system specification} RECORD vRefNum: Integer; {volume reference number} parID: LongInt; {directory ID of parent directory} name: Str63; {filename or directory name} END;TheFSSpecrecord provides a simple and standard format for specifying files and directories. For example, the Standard File Package procedureStandardGetFileuses anFSSpecrecord to return information identifying a user-selected file or folder. You can pass that specification directly to any file-manipulation routines, such asFSpOpenDFandFSpDelete, that acceptFSSpecrecords. In addition, the Alias Manager, Edition Manager, and Finder all useFSSpecrecords to specify files and directories.