Important: The information in this document is obsolete and should not be used for new development.
PBDirCreate
You can use thePBDirCreatefunction to create a new directory.
FUNCTION PBDirCreate (paramBlock: HParmBlkPtr; async: Boolean): OSErr;
paramBlock- A pointer to a basic HFS parameter block.
async- A Boolean value that specifies asynchronous (
TRUE) or synchronous (FALSE) execution.
--> ioCompletionProcPtrA pointer to a completion routine. <-- ioResultOSErrThe result code of the function. <-> ioNamePtrStringPtrA pointer to a pathname. --> ioVRefNumIntegerA volume specification. <-> ioDirIDLongIntA directory ID. DESCRIPTION
ThePBDirCreatefunction is identical toPBHCreateexcept that it creates a new directory instead of a file. You can specify the parent of the directory to be created inioDirID; if it's 0, the new directory is placed in the root directory of the specified volume. The directory ID of the new directory is returned inioDirID. The date and time of its creation and last modification are set to the current date and time.
- Note
- A directory ID, unlike a volume reference number or a working directory reference number, is a
LongIntvalue.![]()
ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBDirCreateare
Trap macro Selector _HFSDispatch $0006 RESULT CODES