Moves the directory or file specified by a given path to a different location in the file system identified by another path.
- macOS 10.0–10.5Deprecated
The path of a file or directory to move.
The path to which
destinationmust not yet exist. The destination path must end in a filename; there is no implicit adoption of the source filename.
source is a file, the method creates a file at
destination that holds the exact contents of the original file and then deletes the original file. If
source is a directory,
move creates a new directory at
destination and recursively populates it with duplicates of the files and directories contained in
source. It then deletes the old directory and its contents. Symbolic links are not traversed, however links are preserved. File or directory attributes—that is, metadata such as owner and group numbers, file permissions, and modification date—are also moved.
The handler callback mechanism is similar to delegation.
file when it begins a copy, move, remove, or link operation. It sends
file when it encounters any error in processing.
If a failure in a move operation occurs, either the preexisting path or the new path remains intact, but not both.
Because this method does not return error information, it has been deprecated as of OS X v10.5. Use