std-file-backup | ![]() |
std-file-backup renames the filename to have the backup extension (which is ".bak" on the dos/windows platform) and copies the bak file the original file! On sucess it return T, else nil which may indicate that:
1) fname does not exist or is a directory,
2) fname has already the backup extension (not on unix, then another .bak suffix is added),
3) you don't have enough privileges to rename the source file, create the bak file or overwite an existing bak file.
It use the rename and copy mechanism to ensure that the original file keeps its attributes (timestamp and creator information) and the new file is created with the current attributes and the current time by std-file-copy.
(std-file-backup "/acad/test.lsp") => T or nil
fname: A filename of an existing file.
T on success or nil.
On success it creates a copy of the file with a platform dependant backup extension, which is ".bak" on DOS, Windows and Unix.
(std-require 'STDFILE)
Defined in STDFILE