Name
afc_fileops_copy -- Copy a file/dir
Synopsis
int afc_fileops_copy
( FileOperations * fo, char * source, char * dest );
Description
This function copies a file/dir from one path to another.
It corresponds to the shell command cp.
Inputs
- fo
Pointer to a valid FileOperations class.
- source
Source file/dir name (with full path) to copy
- dest
Destination file/dir name (with full path) where to copy the source.
Result
AFC_ERR_NO_ERROR: no error occurred
if copy fails for some reason, you'll get different return codes depending on where copy failed.
Note
This function is able to move files and dirs across different file systems on different devices.
It first tries to use the system call rename, but if it fails with EXDEV error, then it
performs a physical move all all files/dirs selected.
This function is recursive.