#include "las.h" #include "diskio.h"FUNCTION c_dkcopy (from, to, directories)
char *from;
char *to;
char directories[][CMLEN];
Specifies the input path/filename of the file to be copied.
Specifies the output path/filename of the file to which the input file is to be copied.
Specifies a list of pathnames for directories to be searched for available space.
If the specified file from does not exist, c_dkcopy() returns a status of DISK_GONE.
c_dkcopy() copies disk files. It was written specifically to copy disk files created by c_dkcre().
c_dkcopy() uses the same algorithms to select a directory and allocate the file as c_dkcre(). The file from is copied and the file to becomes a symbolic link to the actual file. If the file from is a symbolic link, the file it points to is copied and a symbolic link is created to point to the new file.
c_dkcopy() returns
E_SUCC (0) --> successful completion
E_FAIL (-1) --> failure status
DISK_GONE (-3) --> the specified file does not exist
DISK_NOSPACE (-4) --> the disk space specified was not available and
the calling function did not want to wait for
it
The caller must have write access to all specified directories.
Allocating the file is extremely slow through NFS.
A single file is not allowed to span multiple directories, file systems, or disk drives.
The size of the disk file that can be created/copied with this function is limited to the precision of a long integer (i.e., 2,147,483,647 bytes) or the size of the file system, whichever is smaller.