chickadee » chicken » file » copy-file

copy-file ORIGFILE NEWFILE #!optional CLOBBER BLOCKSIZEprocedure

Copies ORIGFILE (a string denoting some filename) to NEWFILE, BLOCKSIZE bytes at a time. BLOCKSIZE defaults to 1024, and must be a positive integer. Returns the number of bytes copied on success, or errors on failure. CLOBBER determines the behaviour of copy-file when NEWFILE is already extant. When set to #f (default), an error is signaled. When set to any other value, NEWFILE is overwritten. copy-file will work across filesystems and devices and is not platform-dependent.