This commit adds a new boolean parameter no_clobber (https://github.com/Svetlitski/fcp/issues/31#issuecomment-1053722797) to the copy_file and copy_into functions in order to provide an option to skip copying files that already exist in the destination directory. If no_clobber is true and the destination file already exists, an error message is printed and the file is skipped.
The copy_directory and copy_single functions were updated to pass the no_clobber parameter to copy_file and copy_into respectively.
This change makes the copying process more efficient by avoiding unnecessary copies and also prevents accidental overwriting of existing files.
This commit adds a new boolean parameter
no_clobber
(https://github.com/Svetlitski/fcp/issues/31#issuecomment-1053722797) to thecopy_file
andcopy_into
functions in order to provide an option to skip copying files that already exist in the destination directory. Ifno_clobber
is true and the destination file already exists, an error message is printed and the file is skipped.The
copy_directory
andcopy_single
functions were updated to pass theno_clobber
parameter tocopy_file
andcopy_into
respectively.This change makes the copying process more efficient by avoiding unnecessary copies and also prevents accidental overwriting of existing files.