Important: The information in this document is obsolete and should not be used for new development.
PBHMoveRename
You can use thePBHMoveRenamefunction to move a file or directory and optionally to rename it.
FUNCTION PBHMoveRename (paramBlock: HParmBlkPtr; async: Boolean): OSErr;
paramBlock- A pointer to a
copyParam variant of the 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. --> ioNewName Ptr A pointer to the destination pathname (may be NIL).--> ioCopyNamePtrA pointer to the file's new name (may be NIL).--> ioNewDirIDLongIntThe destination directory ID. --> ioDirIDLongIntThe source directory ID. DESCRIPTION
ThePBHMoveRenamefunction allows you to move (not copy) a file or directory and optionally to rename it. The source and destination pathnames must point to the same file server volume.You specify the source file or directory with the
ioVRefNum,ioDirID, andioNamePtrfields. You specify the destination directory with theioNewDirIDandioNewNamefields. IfioNewNameisNIL, the destination directory is the directory having IDioNewDirIDon the specified volume; ifioNewNameis notNIL, the destination directory is the directory having the partial pathname pointed to byioNewNamein
the directory having IDioNewDirIDon the specified volume.The
ioCopyNamefield may contain a pointer to an optional string to be used in copying the file or directory; if it is notNIL, the moved object is renamed to the name specified
inioCopyName. The string pointed to byioCopyNamemust be a filename, not a
partial pathname.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBHMoveRenameare
Trap macro Selector _HFSDispatch $0037 RESULT CODES