Important: The information in this document is obsolete and should not be used for new development.
FSpCatMove
You can use theFSpCatMove
function to move a file or directory from one location to another on the same volume.
FUNCTION FSpCatMove (source: FSSpec; dest: FSSpec): OSErr;
source
- An
FSSpec
record specifying the name and location of the file or directory to be moved.dest
- An
FSSpec
record 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 thesource
parameter into the directory specified by thedest
parameter. The directory ID specified in theparID
field of thedest
parameter is the directory ID of the parent of the directory into which you want to move the source file or directory. Thename
field of thedest
parameter 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
PBCatMove
function, which allows you to specify only the directory ID of the destination directory.FSpCatMove
function is strictly a file catalog operation; it does not actually change the location of the file or directory on the disk. You cannot useFSpCatMove
to move
a file or directory to another volume (that is, thevRefNum
field in bothFSSpec
parameters must be the same). Also, you cannot useFSpCatMove
to rename files or directories; to rename a file or directory, useFSpRename
.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forFSpCatMove
are
Trap macro Selector _HighLevelHFSDispatch $000C RESULT CODES