Copies a file and deletes its sourceint sm_file_move ( char *source, char *destination, char *mode );
- The paths of the file in its original and new locations.
destinationmust be different file paths.
destinationmust include a file name; implicit copying to the same name as the source file yields an error. In three-tier applications, the path to source and destination can include a file access server ID in this format:
If you omit
server-id, Panther looks for the file locally.
- Specifies whether to perform a text or binary copy; supply one of these arguments:
sm_file_movecopies a file to the specified destination. If the destination file does not exist,
sm_file_movecreates it; if it already exists, the function overwrites it. When the copy operation is complete, the function deletes the source file. Calling this function is equivalent to successive calls to
In a three-tier environment, you can move files to and from remote file access servers by prefixing the file path with the server ID. For example, this JPL moves file
oakto the local machine:if sm_file_exists( "oak!/disk/reports/rpt.out" )
call sm_file_move \
( "oak!/disk/reports/rpt.out", "c:\reports\rpt.out", "b" )
sm_file_copy, sm_file_exists, sm_file_remove