Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Emulate behaviour of cp when target is directory #102
Any interest in emulating this aspect of cp (second line) in
library(fs) source_file <- path(R.home("doc"), "THANKS") target_directory <- dir_create("just_hold_me") file_copy(source_file, target_directory) #> Error: [EEXIST] Failed to copy '/Library/Frameworks/R.framework/Resources/doc/THANKS' to 'just_hold_me': file already exists file_copy(source_file, path(target_directory, path_file(source_file))) dir_ls(target_directory) #> just_hold_me/THANKS
Created on 2018-04-19 by the reprex package (v0.2.0).
What if the first call to