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 theFSSpec
data 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;TheFSSpec
record provides a simple and standard format for specifying files and directories. For example, the Standard File Package procedureStandardGetFile
uses anFSSpec
record to return information identifying a user-selected file or folder. You can pass that specification directly to any file-manipulation routines, such asFSpOpenDF
andFSpDelete
, that acceptFSSpec
records. In addition, the Alias Manager, Edition Manager, and Finder all useFSSpec
records to specify files and directories.