aboutsummaryrefslogtreecommitdiff
path: root/inc/fileproc.py
diff options
context:
space:
mode:
Diffstat (limited to 'inc/fileproc.py')
-rw-r--r--inc/fileproc.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/inc/fileproc.py b/inc/fileproc.py
index 435078bc..bf6cc8df 100644
--- a/inc/fileproc.py
+++ b/inc/fileproc.py
@@ -1,4 +1,17 @@
1from pathlib import Path 1from pathlib import Path
2import os
3import shutil
4
5def copy_tree(source, destination):
6 destination.mkdir(parents=True, exist_ok=True)
7 for _ in os.listdir(source):
8 i = source / _
9 o = destination / _
10 if i.is_dir():
11 copy_tree(i, o)
12 else:
13 shutil.copy2(str(i), str(o))
14
2 15
3def copy_files(kind, conf, locale, inlist, ptarget): 16def copy_files(kind, conf, locale, inlist, ptarget):
4 o = Path(ptarget) 17 o = Path(ptarget)