FSForkIOParam

Mac OS X header: CoreServices/CoreServices.h  
Mac OS 9 header: Files.h  

Defines a parameter block used by low-level HFS Plus fork I/O functions.

struct FSForkIOParam {
    QElemPtr qLink; 
    SInt16 qType; 
    SInt16 ioTrap; 
    Ptr ioCmdAddr; 
    IOCompletionUPP ioCompletion; 
    volatile OSErr ioResult; 
    void *reserved1; 
    SInt16 reserved2; 
    SInt16 forkRefNum; 
    UInt8 reserved3; 
    SInt8 permissions; 
    const FSRef *ref; 
    Ptr buffer; 
    UInt32 requestCount; 
    UInt32 actualCount; 
    UInt16 positionMode; 
    SInt64 positionOffset; 
    FSAllocationFlags allocationFlags; 
    UInt64 allocationAmount; 
    UniCharCount forkNameLength; 
    const UniChar *forkName; 
    CatPositionRec forkIterator; 
    HFSUniStr255 *outForkName;
};
typedef FSForkIOParam* FSForkIOParamPtr;
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 universal procedure pointer to a completion routine to be executed at the end of an asynchronous call. It should be 0 for asynchronous calls with no completion routine and is automatically set to 0 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.

reserved1

Reserved.

reserved2

Reserved.

forkRefNum

A reference number for a fork.

reserved3

Reserved.

permissions

The desired type of access to the specified fork.

ref

An FSRef for the file or directory to open.

buffer

A pointer to a data buffer.

requestCount

The number of bytes requested for the given operation.

actualCount

The actual number of bytes completed by the call.

positionMode

A constant indicating the base location within the file for the start of the operation. See “Position Mode Constants” for the meaning of the constants you can use in this field.

positionOffset

The offset from the base location specified in the positionMode offset for the start of the operation.

allocationFlags

A set of bit flags used by the FSAllocateFork function to control how space is allocated. See “Allocation Flags” for a descsription of the defined flags.

allocationAmount

For the FSAllocateFork function, the amount of space, in bytes, to allocate.

forkNameLength

The length of the file or directory name passed in the forkName field, in Unicode characters.

forkName

A pointer to the file or directory’s Unicode name. This field is an input parameter; functions which return the file or directory name in the parameter block use the outForkName field.

forkIterator

A fork iterator.

outForkName

A pointer to the file or directory’s Unicode name; this is an output parameter. For functions which require the file or directory name as an input argument, you should pass a pointer to that name in the forkName field and pass the length of the name in the forkNameLength field.


© 2001 Apple Computer, Inc. (Last Updated July 17, 2001)