Copying a file¶
copyfile() |
Copy a file |
SYNTAX
copyfile(destination_path, source_path, options)
Copy a file.
destination_path
source_path
|
The destination pathname and source pathname of the file to be copied. Either file can be on the server machine or a client machine. |
||||||||||
options |
Option flag(s). If more than one option is required they should be combined using the | operator. The available flags (listed in <sculptor.h> are:
Either COPY_BINARY or COPY_TEXT should always be specified since Sculptor cannot at present determine the file type. This feature will be added in a future release. |
This function returns one of the following values:
-1 |
Error encountered. The error number is stored in sys.Errno. |
0 |
No need to copy file; the COPY_UPDATE flag was used and the source file was not newer. |
1 |
File copied. |
EXAMPLE
copyfile("server1:/data/trans", "data/trans", COPY_BINARY | COPY_UPDATE)
RELATED TOPICS |