Skip to content

Commit 341bf7a

Browse files
author
atollk
committed
Added _copy_if functions to fs.copy module.
The free functions copy_file, copy_file_if_newer, copy_dir, copy_dir_if_newer, copy_fs, and copy_fs_if_newer now are all implemented in terms of copy_file_if, copy_dir_if, and copy_fs_if. Unit Tests for this change will be created in a future commit. This change streamlined the code by removing duplication in logic and clustering similar logic closer together. Also, though this has not been tested, copy_dir_if_newer should be faster in this implementation when copying to a dst_dir that contains a lot of files that are not present in the respective src_dir. Finally, a bug was fixed that was caused by a false lookup in the dictionary of file infos from dst_fs. This fix could cause unnecessary copies and therefore a decrease in performance.
1 parent 64d7a52 commit 341bf7a

File tree

1 file changed

+261
-156
lines changed

1 file changed

+261
-156
lines changed

0 commit comments

Comments
 (0)