Important: The information in this document is obsolete and should not be used for new development.
FSpCatMove
You can use theFSpCatMovefunction to move a file or directory from one location to another on the same volume.
FUNCTION FSpCatMove (source: FSSpec; dest: FSSpec): OSErr;
source- An
FSSpecrecord specifying the name and location of the file or directory to be moved.dest- An
FSSpecrecord specifying the name and location of the directory into which the source file or directory is to be moved.DESCRIPTION
The FSpCatMove function moves the file or directory specified by thesourceparameter into the directory specified by thedestparameter. The directory ID specified in theparIDfield of thedestparameter is the directory ID of the parent of the directory into which you want to move the source file or directory. Thenamefield of thedestparameter specifies the name of the directory into which you want to move the source file or directory.
The
- Note
- If you don't already know the parent directory ID of the destination directory, it might be easier to use the
PBCatMovefunction, which allows you to specify only the directory ID of the destination directory.![]()
FSpCatMovefunction is strictly a file catalog operation; it does not actually change the location of the file or directory on the disk. You cannot useFSpCatMoveto move
a file or directory to another volume (that is, thevRefNumfield in bothFSSpecparameters must be the same). Also, you cannot useFSpCatMoveto rename files or directories; to rename a file or directory, useFSpRename.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forFSpCatMoveare
Trap macro Selector _HighLevelHFSDispatch $000C RESULT CODES