file_backup: backup files - usually data files before being overwritten

Description Usage Arguments Details Value Author(s) See Also

View source: R/file_backup.R

Description

Back up a file in external hard drive

Usage

1
2
3
4
5
6
7
file_backup(
  file,
  where = "/Volumes/0414861919/Mac_backup",
  date_ext = c("year", "month", "day"),
  run_spec = "Description of the latest changes you made",
  toplevel = NA
)

Arguments

file

The file to be recorded - relative or full path - assumes it's a full path only if it starts with '/'.

where

Backup scheme: 1. NA: In ./backup folder of working directory. 2. 'path': Full path to the folder where a copy of the file and its log will be stored.

date_ext

Subset of c("year","month","day", "hour", "minute") - details of the renamed file

run_spec

Specification of the run whose output will replace the current one.

toplevel

toplevel directory to replace with where. NA by default.

Details

Backs up in either 1../__backup folder or 2. in anotehr (external hard drive) folder path identical to that on local computer or 3. in another (external hard drive) folder

Value

backs up a renamed version of the file and logs the record.

Author(s)

Al J Abadi, aljalabadi@gmail.com

See Also

Other file: check_files_exist(), dirTree(), move_symlink(), parent_base_ext(), saveRDS2(), suffixer()


aljabadi/Altools documentation built on Jan. 17, 2022, 8:55 a.m.