From 26a8b2b842d3c3cb387c2481790daa07869f245a Mon Sep 17 00:00:00 2001 From: Digital Studium Date: Sat, 22 Jul 2023 23:24:37 +0300 Subject: [PATCH] first commit --- common.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 common.py diff --git a/common.py b/common.py new file mode 100644 index 0000000..c7f03d0 --- /dev/null +++ b/common.py @@ -0,0 +1,18 @@ +import os +import shutil + + +def read_file(file_path): + with open(file_path, 'r') as f: + file_content = f.read() + return file_content + + +def write_file(file_path, content): + with open(file_path, 'w') as f: + f.write(content) + + +def copy_file(src, dst): + os.makedirs(os.path.dirname(dst), exist_ok=True) + shutil.copy2(src, dst) \ No newline at end of file