Copies a fileint sm_file_copy(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
destinationcan 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_copycopies the specified file. If the destination file does not exist,
sm_file_copycreates it; if it already exists, the function overwrites it.
In a three-tier environment, you can copy files to and from a remote file access server by prefixing the file path with the server ID. For example, this JPL copies file
oakto the local client:vars err = ""
err = sm_file_copy \
("oak!/disk/reports/rpt.out", "c:\reports\rpt.out", "b")
if err == 0 && cleanup() == 1
sm_file_exists, sm_file_move, sm_file_remove