Make a backup file: Difference between revisions
Content deleted Content added
→{{header|Go}}: modify to require existing file |
Added PicoLisp |
||
Line 199: | Line 199: | ||
AMSDOS has automatic one-level backups which also work from Locomotive BASIC: If e.g. the file <tt>test.bas</tt> is saved, the data gets written to <tt>test.$$$</tt>. When the file is closed a preexisting <tt>test.bas</tt> gets renamed to <tt>test.bak</tt> and finally <tt>test.$$$</tt> is renamed to <tt>test.bas</tt>. (These backups affect all file types, not just BASIC source code.) |
AMSDOS has automatic one-level backups which also work from Locomotive BASIC: If e.g. the file <tt>test.bas</tt> is saved, the data gets written to <tt>test.$$$</tt>. When the file is closed a preexisting <tt>test.bas</tt> gets renamed to <tt>test.bak</tt> and finally <tt>test.$$$</tt> is renamed to <tt>test.bas</tt>. (These backups affect all file types, not just BASIC source code.) |
||
=={{header|PicoLisp}}== |
|||
PicoLisp makes use of external commands as much as possible (at least for not time-critical operations), to avoid duplicated functionality. |
|||
<lang PicoLisp>(let Path (in '(realpath "foo") (line T)) |
|||
(call 'mv Path (pack Path ".backup")) |
|||
(out Path |
|||
(prinl "This is the new file") ) )</lang> |
|||
=={{header|Pike}}== |
=={{header|Pike}}== |