Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 1 - Introduction to File Management / About Files


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 the FSSpec 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;
The FSSpec record provides a simple and standard format for specifying files and directories. For example, the Standard File Package procedure StandardGetFile uses an FSSpec record to return information identifying a user-selected file or folder. You can pass that specification directly to any file-manipulation routines, such as FSpOpenDF and FSpDelete, that accept FSSpec records. In addition, the Alias Manager, Edition Manager, and Finder all use FSSpec records to specify files and directories.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996