18 lines
349 B
Python
18 lines
349 B
Python
|
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)
|