DirCreate
DirCreate Create a directory
#include <Files.h> File Manager
OSErr DirCreate( vRefNum, parentDirID, dirName, createdDirID );
short vRefNum; volume or directory reference number
long parentDirID; directory ID of parent directory
Str255 dirName; address of length-prefixed directory name
long * createdDirID; directory ID of newly created directory
returns Error Code; 0=no error
DirCreate creates a directory. It returns the new directory ID in the
createdDirID parameter.
vRefNum is the reference number of the volume or directory
containing fileName . See FSOpen for a description of the options.
parentID is the reference number of the directory that will hold the
newly created directory.
dirName is the address of a length-prefixed, pascal-style string
containing the name of the directory to be created. You should NOT
use names beginning with a period ('.') since that convention is
reserved for devices.
createdDirID is the ID of the newly created directory.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
bdNamErr (-37) Bad name
dirFulErr (-33) Directory full
dupFNErr (-48) Duplicate filename (rename)
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