|
|
@ -15,6 +15,10 @@ def read_file(path): |
|
|
|
file_content = f.read() |
|
|
|
return file_content |
|
|
|
|
|
|
|
def write_file(path, data): |
|
|
|
with open(path, "w+") as f: |
|
|
|
f.write(data) |
|
|
|
|
|
|
|
def write_json(content, outpath): |
|
|
|
# create path if not existing |
|
|
|
out_dir = os.path.dirname(outpath) |
|
|
|