Description Usage Arguments Details Value
Backup a file if necessary
1 | backup_file(path, sep = "_", stamp = "%y%m%d")
|
path |
A file path. |
sep |
A character to separate the existing file path and the stamp added. |
stamp |
A datestamp (default) and/or timestamp constructed according to this specification (POSIXct) is added to pre-existing files in path. |
The stamp is extracted from an existing file's modification time.
For details file.mtime(...).
If a backup file with the same stamp exists, it is replaced In practical terms
this means that by using "%y%m%d"
as stamp, only the last backup per
day is preserved.
TRUE
if succesful, FALSE
otherwise.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.