chickadee » chicken » file » move-file

move-file ORIGFILE NEWFILE #!optional CLOBBER BLOCKSIZEprocedure

Moves ORIGFILE (a string denoting some filename) to NEWFILE, with the same semantics as copy-file, above. move-file is safe across filesystems and devices (unlike rename-file). It is possible for an error to be signaled despite partial success if NEWFILE could be created and fully written but removing ORIGFILE fails.

If CLOBBER is given and not #f, NEWFILE will be replaced when it already exists, otherwise an error is signaled.

The BLOCKSIZE argument indicates the block size to use when copying the file a block at a time. It must be a positive integer, and it defaults to 1024.