Synopsis:
sys_fcopy(source_filename,dest_filename{,non_block_flag})
Arguments:
source_filename - The name of the source file
dest_filename - The name of the destination file
non_block_flag - Optional flag to specify if the calling task should block until copy completes.
Description: This function attempts to copy the file specified in source_filename to the file specified in dest_filename. Since a file copy can take a substaintial amount of time (depending on the file size) the copy is carried out in a separate thread and the calling task is blocked (unless the non_block_flag is specified and set to a non zero value). When the copy has complete then the calling task is woken up.
If the optional non_block_flag is set to a non-zero value then the function will return immediately. Only one file copy can be carried out by a task at any one time, although multiple file copies can be being carried out by multiple tasks
Return Value:
Returns 0 on sucess or a negative error value is the copy fails.
Return Value: Will return 1 if end of file has been reached, otherwise will return 0 or a negative error code