HOpenDF
HOpenDF
Create an access path to the data fork of a file OSErr HOpenDF(vRefNum , dirID, filename, permission, refNum); short vRefNum ; a volume or working directory reference number long dirID ; the directory ID
ŸStr255 filename ; name of the file to open
Ÿchar permission ; permission level
Ÿ short * refNum ; points to the path reference number
HOpenDF creates an access path to the data fork of a file. It is an HFS version vRefNum a volume or working directory reference number dirID is the directory reference number.
filename is the name of the file to open
permission set this parameter to request the kind of access path permission you
want.
refNum points to a path reference number
Returns: an operating system Error Code. It will be one of: noErr (0) No error
bdNamErr (-37) Bad name
extFSErr (-58) External file system
ioErr (-36) I/O error
nsvErr (-35) No such volume
opWrErr (-49) File already open for writing
tmfoErr (-42) Too many files open
Notes: HOpenDF takes a permission parameter In most cases, you can simply set the permission parameter to fsCurPerm.
Some applications request fsRdWrPerm, to ensure that they can both read
and write to a file. The constants that can be passed in this field are the
following:
fsCurPerm exclusive read/write permission if it is available;
otherwise, exclusive read, if that is available
fsRdPerm exclusive read permission
fsWrPerm exclusive write permission
fsRdWrPerm exclusive read/write permission
fsRdWrShPerm shared read/write permission
In shared environments, permission requests are translated into the
"deny-mode" permissions defined by AppleShare.