Carbon


DirInfo

Header: Files.h

struct DirInfo {
    QElemPtr qLink; 
    SInt16 qType; 
    SInt16 ioTrap; 
    Ptr ioCmdAddr; 
    IOCompletionUPP ioCompletion; 
    volatile OSErr ioResult; 
    StringPtr ioNamePtr; 
    SInt16 ioVRefNum; 
    SInt16 ioFRefNum; 
    SInt8 ioFVersNum; 
    SInt8 filler1; 
    SInt16 ioFDirIndex; 
    SInt8 ioFlAttrib; 
    SInt8 ioACUser; 
    DInfo ioDrUsrWds; 
    SInt32 ioDrDirID; 
    UInt16 ioDrNmFls; 
    SInt16 filler3[9]; 
    UInt32 ioDrCrDat; 
    UInt32 ioDrMdDat; 
    UInt32 ioDrBkDat; 
    DXInfo ioDrFndrInfo; 
    SInt32 ioDrParID;
};

Field descriptions

qLink

A pointer to the next entry in the file I/O queue. (This field is used internally by the File Manager to keep track of asynchronous calls awaiting execution.)

qType

The queue type. (This field is used internally by the File Manager.)

ioTrap

The trap number of the function that was called. (This field is used internally by the File Manager.)

ioCmdAddr

The address of the function that was called. (This field is used internally by the File Manager.)

ioCompletion

A pointer to a completion routine to be executed at the end of an asynchronous call. It should be NULL for asynchronous calls with no completion routine and is automatically set to NULL for all synchronous calls. See IOCompletionProcPtr for information about completion routines.

ioResult

The result code of the function. For synchronous calls, this field is the same as the result code of the function call itself. To determine when an asynchronous call has actually been completed, your application can poll this field; it’s set to a positive number when the call is made and receives the actual result code when the call is completed.

ioNamePtr

A pointer to a pathname. Whenever a function description specifies that ioNamePtr is used—whether for input, output, or both—it’s very important that you set this field to point to storage for a Str255 value (if you’re using a pathname) or to NULL (if you’re not).

ioVRefNum

A volume specification. You can specify a volume using a volume reference number, a drive number, a working directory reference number, or 0 for the default drive.

ioFRefNum

The file reference number of an open file.

ioFVersNum

A file version number. This field is no longer used and you should always set it to 0.

filler1

Reserved.

ioFDirIndex

A file and directory index. If this field contains a positive number, PBGetCatInfo returns information about the file or directory having that directory index in the directory specified by the ioVRefNum field. (If ioVRefNum contains a volume reference number, the specified directory is that volume’s root directory.)

If this field contains 0, PBGetCatInfo returns information about the file or directory whose name is specified in the ioNamePtr field and that is located in the directory specified by the ioVRefNum field. (Once again, if ioVRefNum contains a volume reference number, the specified directory is that volume’s root directory.)

If this field contains a negative number, PBGetCatInfo ignores the ioNamePtr field and returns information about the directory specified in the ioDirID field. If both ioDirID and ioVRefNum are set to 0, PBGetCatInfo returns information about the current default directory.

ioFlAttrib

File or directory attributes. The bits in this field have the following meanings:

ioACUser

The user’s access rights for the specified directory. The bits in this field have the following meanings:

For example, if you call PBGetCatInfo for a particular shared volume and ioACUser returns 0, you know that the user is the owner of the directory and has complete privileges to it.

ioDrUsrWds

Information used by the Finder.

ioDrDirID

A directory ID. On input to PBGetCatInfo, this field contains a directory ID (which is used only if the value of the ioFDirIndex field is negative). On output, this field contains the directory ID of the specified directory.

ioDrNmFls

The number of files in the directory.

filler3

Reserved.

ioDrCrDat

The date and time of the directory’s creation, specified in seconds since midnight, January 1, 1904.

ioDrMdDat

The date and time of the last modification to the directory, specified in seconds since midnight, January 1, 1904.

ioDrBkDat

The date and time of the last backup to the directory, specified in seconds since midnight, January 1, 1904.

ioDrFndrInfo

Additional information used by the Finder.

ioDrParID

The directory ID of the specified directory’s parent.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)