FSpCreate
FSpCreate Create a new file and set the type and creator OSType creator; identifies the file creator OSType fileType ; identifies the file type ScriptCode scriptTag ; identifies the script system code FSpCreate creates a new file and sets the type and creator. It is the high-level, FSSpec version of the PBHCreate function. spec is a ponter to an FSSpec record specifying the file to be created creator is used to set the new file creator
fileType is used to set the new file type
scriptTag specifies the code of the script system in which the document name
this parameter.
Returns: an operating system Error Code. It will be one of: noErr (0) No error
bdNamErr (-37) Bad name
dirFulErr (-33) Directory full
dirNFErr (-120) Directory not found
dupFNErr (-48) Duplicate filename already exists
extFSErr (-58) External file system
ioErr (-36) I/O error
nsvErr (-35) No such volume
vLckdErr (-46) Volume is locked
wPrErr (-44) Diskette is write-protected
Notes: If you have established the name and location of the new file through either
code returned in the reply record. Otherwise, specify the system script by
setting the scriptTag parameter to smSystemScript. For more information
on script systems, see the Worldwide Software Overview