c_dkcopy - Copies a disk file

SYNTAX

#include      "las.h"
#include      "diskio.h"
int c_dkcopy (from, to, directories)

     char               *from;
     char               *to;
     char               directories[][CMLEN];

PARAMETERS

from (input, character, length(CMLEN))

Specifies the input path/filename of the file to be copied.

to (input, character, length(CMLEN))

Specifies the output path/filename of the file to which the input file is to be copied.

directories (input, character, length(CMLEN))

Specifies a list of pathnames for directories to be searched for available space.

DESCRIPTION

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.

RETURN VALUE

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

SPECIAL CONSIDERATIONS

The caller must have write access to all specified directories.

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 with this function is limited to the precision of a long long integer (i.e., 263 bytes) or the size of the file system, whichever is smaller.