File Syncing

Usage

sync(dir1, dir2, one_way = FALSE, recursive = TRUE, ...)

sync_img(dir1 = QP("PRESENTATION/figure"), dir2 = QP("PRESENTATION/assets/img"), 
  ...)

sync_rnp(dir1 = QP("REPORT/figure"), dir2 = QP("PRESENTATION/figure"), ...)

sync_all()

Arguments

dir1
The path to the first directory.
dir2
The path to the second directory.
one_way
logical. If TRUE the contents of dir2 be copied to dir1, however, dir2 contents will not change. If FALSE both dir1 and dir2 files will be copied to other (dir1 and dir2 will contain identical contents).
recursive
logical. Should directories and contents be recursively copied?
...
For the sync function ... are other arguments passed to file.copy. For sync_img and sync_rnp ... are additional arguments passed to sync.

Value

Syncs files between directories.

Description

sync - Sync files between directories.

sync_img - A wrapper for sync to easily sync the files in ‘~/PRESENTATION/figure’ and ‘~/PRESENTATION/assets/img’.

sync_rnp - A wrapper for sync to easily sync the files in ‘~/REPORT/figure’ and ‘~/PRESENTATION/figure’.

sync_all - A wrapper for sync to easily sync all files between ‘~/REPORT/figure’, ‘~/PRESENTATION/figure’, and ‘~/PRESENTATION/assets/img’.

See also

file.copy