YedFileMan - Copy
SINT Copy(void *pvO,SCHAR *pscSource,SCHAR *pscDest,SINT siFlag);
The method copies pscSource in pscDest, according to siFlag content. siFlag is a bit mask, whose single bits can combined in OR mode to reach the target. If siFlag is 0, the default operation is the copy of pscSource in pscDest with overwriting control.
The values you can put in OR mask in siFlag are:
destination always overwritten
pscDest is an hard link to pscSource ( see also link(2))
pscDest is a symbolic link to pscSource ( see also symlink(2))
in case of copy, create a backup of pscDest if it already exists. The backup file name is the same of pscDest, with suffix '˜y'
if possible, pscDest will preserve user ID, group ID, permissions and times of pscSource.
After copying, force syncing of device involved in the operation.
WARNING: using this value is not a 100% warranty of phisic writing.
Combining values YF_FORCESYNC or YF_PRESERVE with values YF_HARDLINK or YF_SYMLINK does not have any effect.
pvO is the instance of the object invoking the method.
The method returns YFSUCCESS in case of correct termination. Else, it returns:
pscSource or pscDest buffer length is greater than MAX_SIZE_NAME
pscSource is non-existent.
Generic error: read errno value for more details
pscSource is a directory
pscDest exists, and the method has been invoked without enabling destination overwriting
Writing error in pscDest
Reading error in pscSource
Error in opening file.
siFlag bit mask has invalid values.