Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_filecopy() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_FILECOPY()

 DESCRIPTION

 C_FILECOPY() copies the contents of a given file to another
 specified file.  The entire source file is copied to the target
 file leaving the source file unchanged.  The size of the buffer
 used during the copy can be optionally specified.

 NOTES

 Both the source and target files must be closed before calling this
 function.

 SYNTAX

 C_FILECOPY(source_file, target_file [,bufsize] [,network])

 PARAMETERS

 source_file (C) is the name of the source file to copy.  The
 contents of source_file will be copied to the target file leaving
 this file unchanged.  The complete file name including drive and
 path can be specified.  If a drive and path are not given, the file
 is assumed to be in the current directory.

 target_file (C) is the name of the target file to copy.  The
 contents of the source file are copied to the target file.  If
 target_file exists, it will be overwritten, if it does not exist,
 it will be created.  The complete file name including drive and
 path can be specified.  If a drive and path are not given, the file
 is assumed to be in the current directory or if it does not exist
 it will be created in the current directory.

 bufsize (N) is the size of the buffer in bytes to use during the
 copy from 1 to 64,000.  The larger the buffer size, the faster the
 copy will be performed.  If bufsize is not specified, the default
 size of 4096 will be used.  Note that a bufsize of 4096 bytes
 performs a fairly fast copy and is usually available in the
 application.

 network (L) indicates whether or not the program is running on a
 network.  If the program is running on a network pass true (.T.) so
 the file can be opened with the proper share access, otherwise pass
 false (.F.).  If network is not specified, the default of false
 (.F.) is used.

 RETURNS

 C_FILECOPY() returns a code indicating the status as follows:

 RETURN CODE         DESCRIPTION
 -----------         -----------
 0                   Successful copy
 1                   Source file not found
 2                   Error opening target file
 3                   Can not allocate memory
 4                   Error during copy

 EXAMPLES

 && Copy "text1.fil" to "text2.fil"

 c_filecopy("text1.fil","text2.fil")


See Also: C_FILEAPPEND() C_FILEGRAB() C_EXIST()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson