The File Manager provides the FSpOpenDF , FSpCreate , and FSpDelete routines, which allow you to open, create, and delete files. FSpOpenDF You can use the FSpOpenDF function to open a file's data fork. A constant indicating the desired file access permissions. The FSpOpenDF function opens the data fork of the file specified by the spec parameter and returns a file reference number in the refNum parameter. The permission parameter specifies the kind of access permission mode you want.
Some applications request fsRdWrPerm , to ensure that they can both read from and write to a file.
The file type of the new file. If you have established the name and location of the new file using either the StandardPutFile or CustomPutFile procedure, specify the script code returned in the reply record. Otherwise, specify the system script by setting the scriptTag parameter to the value smSystemScript . The new file is unlocked and empty. The date and time of creation and last modification are set to the current date and time.