This commit is contained in:
Mikan
2025-06-02 14:16:03 +03:00
commit 83cfcd9fb1
19 changed files with 430 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import os
def read_file(file_path: str) -> str:
"""
Читает содержимое файла.
"""
with open(file_path, "r") as f:
return f.read()
def write_file(file_path: str, content: str):
"""
Записывает содержимое в файл.
"""
with open(file_path, "w", encoding="utf-8") as f:
f.write(content)
def create_directory(path: str):
"""
Создает директорию, если она не существует.
"""
os.makedirs(path, exist_ok=True)