in src/sfctl/custom_app.py [0:0]
def upload_to_fileshare(source, dest, show_progress):
"""
Copies the package from source folder to dest folder
"""
total_files_count = 0
current_files_count = 0
for root, _, files in os.walk(source):
total_files_count += len(files)
for root, _, files in os.walk(source):
for single_file in files:
rel_path = root.replace(source, '').lstrip(os.sep)
dest_path = os.path.join(dest, rel_path)
if not os.path.isdir(dest_path):
os.makedirs(dest_path)
shutil.copyfile(
os.path.join(root, single_file), os.path.join(dest_path, single_file)
)
current_files_count += 1
print_progress(current_files_count, total_files_count,
os.path.normpath(os.path.join(rel_path, single_file)),
show_progress)
if show_progress:
print('Complete', file=sys.stderr)