Remove spinal.copy, just let the caller do it.

This commit is contained in:
voussoir 2021-11-07 19:28:32 -08:00
parent 7c205522ce
commit 41ec819a35
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -73,21 +73,6 @@ def callback_progress_v1(path, written_bytes, total_bytes):
safeprint.safeprint(status, end=ends)
sys.stdout.flush()
def copy(source, file_args=None, file_kwargs=None, dir_args=None, dir_kwargs=None):
'''
Perform copy_dir or copy_file as appropriate for the source path.
'''
source = pathclass.Path(source)
if source.is_file:
file_args = file_args or tuple()
file_kwargs = file_kwargs or dict()
return copy_file(source, *file_args, **file_kwargs)
elif source.is_dir:
dir_args = dir_args or tuple()
dir_kwargs = dir_kwargs or dict()
return copy_dir(source, *dir_args, **dir_kwargs)
raise SpinalError(f'Neither file nor dir: {source}')
def copy_dir(
source,
destination=None,