PBMakeFSSpecSync
PBMakeFSSpec Make an FSSpec record
#include <Files.h> File Manager
OSErr PBMakeFSSpec(pb, async );
HParmBlkPtr pb ; pointer to an array of FSSpec records
Boolean async ; 0=await completion; 1=immediate return
returns Error Code; 0=no error
Given a complete specification for a file or directory, PBMakeFSSpec fills
in an FSSpec record that identifies the file or directory.
pb is the address of an HParamBlockRec structure.The relevant fields
are as follows:
Out-In Name Type Size Offset Description
Æ ioCompletion ProcPtr 4 12 pointer to completion routine
¨ ioResult short 2 16 result code
Æ ioNamePtr StringPtr 4 18 pointer to volume name
Æ ioVRefNum short 2 22 volume specification
Æ ioMisc Ptr 4 28 pointer to FSSpec record
ۮ ioDirID long 4 48 parent directory ID
async is a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error (entire catalog has not been searched)
fnfErr (-43) File or directory does not exist (FSSpec is still
valid)

Notes: See Using FSSpec Records under Using the File Manager for a
detailed description of valid file specifications.
Field descriptions
ioCompletion A pointer to the completion routine.
ioResult Result code.
ioNamePtr A pointer to the file or directory name.
ioVRefNum The volume specification (volume reference number,
working directory reference number, drive number, or
0 for default volume).
ioMisc A pointer to the FSSpec record.
ioDirID The directory or parent directory specification.
If the specified volume is mounted and the specified parent directory exists,
but the target file or directory doesn't exist in that location, PBMakeFSSpec
fills in the record and returns fnfErr instead of noErr. The record is valid, but
it describes a target that doesn't exist. You can use the record for an other
operation, such as creating a file to replace one that is missing.
In addition to the result codes listed here, PBMakeFSSpec can return a
number of different File Manager error codes. When PBMakeFSSpec
returns any result other than noErr or fnfErr, all fields of the resulting
FSSpec record are set to 0.