commit 26a8b2b842d3c3cb387c2481790daa07869f245a Author: Digital Studium Date: Sat Jul 22 23:24:37 2023 +0300 first commit 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