![]() |
CSParam |
Header: Files.h |
struct CSParam { QElemPtr qLink; SInt16 qType; SInt16 ioTrap; Ptr ioCmdAddr; IOCompletionUPP ioCompletion; volatile OSErr ioResult; StringPtr ioNamePtr; SInt16 ioVRefNum; FSSpecPtr ioMatchPtr; SInt32 ioReqMatchCount; SInt32 ioActMatchCount; SInt32 ioSearchBits; CInfoPBPtr ioSearchInfo1; CInfoPBPtr ioSearchInfo2; SInt32 ioSearchTime; CatPositionRec ioCatPosition; Ptr ioOptBuffer; SInt32 ioOptBufSize; }; typedef CSParam CSParamPtr;
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.)
The queue type. (This field is used internally by the File Manager.)
The trap number of the function that was called. (This field is used internally by the File Manager.)
The address of the function that was called. (This field is used internally by the File Manager.)
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.
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; its set to a positive number when the call is made and receives the actual result code when the call is completed.
A pointer to a pathname. Whenever a function description specifies that ioNamePtr is usedwhether for input, output, or bothits very important that you set this field to point to storage for a Str255 value (if youre using a pathname) or to NULL (if youre not).
A volume specification (volume reference number, working directory reference number, drive number, or 0 for default volume).
A pointer to an array of FSSpec structures in which the file and directory names that match the selection criteria are returned. The array must be large enough to hold the largest possible number of FSSpec structures, as determined by the ioReqMatchCount field.
The maximum number of matches to return. This number should be the number of FSSpec structures that will fit in the memory pointed to by ioMatchPtr. You can use this field to avoid a possible excess of matches for criteria that prove to be too general (or to limit the length of a search if the ioSearchTime field isnt used).
The number of actual matches found.
The fields of the parameter blocks ioSearchInfo1 and ioSearchInfo2 that are relevant to the search.
A pointer to a CInfoPBRec parameter block that contains values and the lower bounds of ranges for the fields selected by ioSearchBits.
A pointer to a second CInfoPBRec parameter block that contains masks and upper bounds of ranges for the fields selected by ioSearchBits.
A time limit on a search, in Time Manager format. Use this field to limit the run time of a single call to PBCatSearch. A value of 0 imposes no time limit. If the value of this field is positive, it is interpreted as milliseconds. If the value of this field is negative, it is interpreted as negated microseconds.
A position in the catalog where searching should begin. Use this field to keep an index into the catalog when breaking down the PBCatSearch search into a number of smaller searches. This field is valid whenever PBCatSearch exits because it either spends the maximum time allowed by ioSearchTime or finds the maximum number of matches allowed by ioReqMatchCount.
To start at the beginning of the catalog, set the initialize field of ioCatPosition to 0. Before exiting after an interrupted search, PBCatSearch sets that field to the next catalog entry to be searched.
To resume where the previous call stopped, pass the entire CatPosition structure returned by the previous call as input to the next.
A pointer to an optional read buffer. The ioOptBuffer and ioOptBufSize fields let you specify a part of memory as a read buffer, increasing search speed.
The size of the buffer pointed to by ioOptBuffer. Buffer size effectiveness varies with models and configurations, but a 16 KB buffer is likely to be optimal. The size should be at least 1024 bytes and should be an integral multiple of 512 bytes.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)