sprint/SprintLib/utils.py
Egor Matveev 6a881b68c8 gitlab ci
2021-11-04 20:52:07 +03:00

13 lines
364 B
Python

from os import listdir
from os.path import isfile, join
from shutil import copyfile, copytree
def copy_content(from_dir, to_dir, exc=()):
for file in listdir(from_dir):
if file in exc:
continue
full_path = join(from_dir, file)
func = copyfile if isfile(full_path) else copytree
func(full_path, join(to_dir, file))