Important: The information in this document is obsolete and should not be used for new development.
OpenWD
You can use theOpenWDfunction to create a working directory.
FUNCTION OpenWD (vRefNum: Integer; dirID: LongInt; procID: LongInt; VAR wdRefNum: Integer): OSErr;
vRefNum- A volume reference number, a working directory reference number, or 0 for the default volume.
dirID- A directory ID.
procID- A working directory user identifier. You should use your application's signature as the user identifier.
wdRefNum- On exit, the working directory reference number.
DESCRIPTION
TheOpenWDfunction creates a working directory that corresponds to the specified directory. It returns inwdRefNuma working directory reference number that can be used in subsequent File Manager calls.If a working directory having the specified user identifier already exists for the specified directory, no new working directory is opened; instead, the existing working directory reference number is returned in
wdRefNum. If the specified directory already has a working directory with a different user identifier, a new working directory reference number is returned.If the directory specified by the
dirIDparameter is the volume's root directory, no working directory is created; instead, the volume reference number is returned in thewdRefNumparameter.RESULT CODES
noErr 0 No error nsvErr -35 No such volume fnfErr -43 No such directory tmwdoErr -121 Too many working directories open afpAccessDenied -5000 User does not have the correct access to the file