berner@Navajo.ARPA (William Berner) (03/04/86)
Here is the missing page from Inside Macintosh. This was posted to
Info-Mac awhile back, but I'm afraid that I've forgotten who posted
it.
[from [SUMEX]<INFO-MAC>INSIDEMACPAGEII-91.TXT]
-------------------------------------------------------------------------
The File Manager
Result codes noErr No error
bdNamErr Bad file name
dupFNErr Duplicate file name and version
dirFulErr File directory full
extFSErr External file system
ioErr I/O error
nsvErr No such volume
vLckdErr Software volume lock
wPrErr Hardware volume lock
FUNCTION FSOpen (fileName: Str255; vRefNum: INTEGER; VAR refNum:
INTEGER) : OSErr; [Not in ROM]
FSOpen creates an access path to the file having the name fileName on the
volume specified by vRefNum. A path reference number is returned in refNum.
The access path's read/write permission is set to whatever the file's open
permission allows.
Result codes noErr No error
bdNamErr Bad file name
extFSErr External file system
fnfErr File not found
ioErr I/O error
nsvErr No such volume
opWrErr File already open for writing
tmfoErr Too many files open
FUNCTION OpenRF (fileName: Str255; vRefNum: INTEGER; VAR refNum:
INTEGER) : OSErr; [Not in ROM]
OpenRF is similar to FSOpen; the only difference is that OpenRF opens the
resource fork of the specified file rather than the data fork. A path
reference number is returned in refNum. The access path's read/write
permission is set ot whatever the file's open permission allows.
NOTE: Normally you should access a file's resource fork through the
routines of the Resource Manager rather than the File Manager. OpenRF
doesn't read the resource map into memory; it's really only useful for
block-level operations such as copying files.
Result codes noErr No error
bdNamErr Bad file name
extFSErr External file system
fnfErr File not found
ioErr I/O error
nsvErr No such volume
opWrErr File already open for writing
tmfoErr Too many files open
High-level File Manager Routines II-91