Important: The information in this document is obsolete and should not be used for new development.
PBHMoveRename
You can use thePBHMoveRename
function 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.
--> ioCompletion
ProcPtr
A pointer to a completion routine. <-- ioResult
OSErr
The result code of the function. --> ioNamePtr
StringPtr
A pointer to a pathname. --> ioVRefNum
Integer
A volume specification. --> ioNewName Ptr A pointer to the destination pathname (may be NIL
).--> ioCopyName
Ptr
A pointer to the file's new name (may be NIL
).--> ioNewDirID
LongInt
The destination directory ID. --> ioDirID
LongInt
The source directory ID. DESCRIPTION
ThePBHMoveRename
function 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
, andioNamePtr
fields. You specify the destination directory with theioNewDirID
andioNewName
fields. IfioNewName
isNIL
, the destination directory is the directory having IDioNewDirID
on the specified volume; ifioNewName
is notNIL
, the destination directory is the directory having the partial pathname pointed to byioNewName
in
the directory having IDioNewDirID
on the specified volume.The
ioCopyName
field 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 byioCopyName
must be a filename, not a
partial pathname.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBHMoveRename
are
Trap macro Selector _HFSDispatch $0037 RESULT CODES