Name
afc_fileops_move -- Move a file/dir
Synopsis
int afc_fileops_move
( FileOperations * fo, char * source, char * dest );
Description
This function moves a file/dir from one path to another. It can also be used to rename files.
It corresponds to the shell command mv.
Inputs
- fo
Pointer to a valid FileOperations class.
- source
Source file/dir name (with full path) to move or rename
- dest
Destination file/dir name (with full path) where to move or rename the source.
Result
AFC_ERR_NO_ERROR: no error occurred
if move fails for some reason, you'll get the AFC_FILEOPS_ERR_RENAME error.
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.