Copy files from one directory to another only if they don't already exist
Source:R/ngr_fs_copy_if_missing.R
ngr_fs_copy_if_missing.RdRecursively lists files in dir_in and copies them to the same relative
path under dir_out, skipping any files that already exist.
See also
Other fs:
ngr_fs_id_missing()
Examples
dir_in <- fs::dir_create(fs::path(tempfile(), "a"))
dir_out <- fs::dir_create(fs::path(tempfile(), "b"))
fs::file_create(fs::path(dir_in, "test.txt"))
ngr_fs_copy_if_missing(fs::path_dir(dir_in), fs::path_dir(dir_out))
fs::file_exists(fs::path(dir_out, "a", "test.txt"))
#> /tmp/RtmpR2fXOa/file22e32e1c0fa/b/a/test.txt
#> FALSE