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 2 - File Manager / File Manager Reference
Data Structures


File Control Block Parameter Blocks

The low-level HFS function PBGetFCBInfo uses the file control block parameter block defined by the FCBPBRec data type.

TYPE FCBPBRec     =        {file control block parameter block}
RECORD
   qLink:         QElemPtr;      {next queue entry}
   qType:         Integer;       {queue type}
   ioTrap:        Integer;       {routine trap}
   ioCmdAddr:     Ptr;           {routine address}
   ioCompletion:  ProcPtr;       {pointer to completion routine}
   ioResult:      OSErr;         {result code}
   ioNamePtr:     StringPtr;     {pointer to pathname}
   ioVRefNum:     Integer;       {volume specification}
   ioRefNum:      Integer;       {file reference number}
   filler:        Integer;       {reserved}
   ioFCBIndx:     Integer;       {FCB index}
   filler1:       Integer;       {reserved}
   ioFCBFlNm:     LongInt;       {file ID}
   ioFCBFlags:    Integer;       {flags}
   ioFCBStBlk:    Integer;       {first allocation block of file}
   ioFCBEOF:      LongInt;       {logical end-of-file}
   ioFCBPLen:     LongInt;       {physical end-of-file}
   ioFCBCrPs:     LongInt;       {position of the file mark}
   ioFCBVRefNum:  Integer;       {volume reference number}
   ioFCBClpSiz:   LongInt;       {file's clump size}
   ioFCBParID:    LongInt;       {parent directory ID}
END;
Field Description
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 routine that was called. (This field is used internally by the File Manager.)
ioCmdAddr
The address of the routine 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 NIL for asynchronous calls with
no completion routine and is automatically set to NIL for all synchronous calls. See "Completion Routines" on page 2-238 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 routine 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 NIL (if you're not).
ioVRefNum
A volume specification (volume reference number, working directory reference number, drive number, or 0 for default volume).
ioRefNum
The file reference number of an open file.
filler
Reserved.
ioFCBIndx
An index for use with the PBGetFCBInfo function.
filler1
Reserved.
ioFCBFlNm
The file ID.
ioFCBFlags
Flags describing the status of the file. The bits in this field that are currently used have the following meanings:
 BitMeaning
 8Set if data can be written to the file
 9Set if this FCB describes a resource fork
 10Set if the file has a locked byte range
 11Reserved
 12Set if the file has shared write permissions
 13Set if the file is locked (write-protected)
 14Set if the file's clump size is specified in the FCB
 15Set if the file has changed since it was last flushed
ioFCBStBlk
The number of the first allocation block of the file.
ioFCBEOF
The logical end-of-file.
ioFCBPLen
The physical end-of-file.
ioFCBCrPs
The position of the file mark.
ioFCBVRefNum
The volume reference number.
ioFCBClpSiz
The file clump size.
ioFCBParID
The file's parent directory ID.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996