update
This commit is contained in:
parent
2fab4515bd
commit
0c471c8fb5
@ -20,6 +20,12 @@ def write_to_file(content, file_path: Path, json_dumps=False, indent=None):
|
|||||||
return f.write(content)
|
return f.write(content)
|
||||||
|
|
||||||
|
|
||||||
|
def append_to_file(content: str, file_path: Path):
|
||||||
|
file_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
with open(file_path, mode="a") as f:
|
||||||
|
return f.write(content)
|
||||||
|
|
||||||
|
|
||||||
def write_binary_to_file(content, file_path: Path):
|
def write_binary_to_file(content, file_path: Path):
|
||||||
file_path.parent.mkdir(parents=True, exist_ok=True)
|
file_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
with open(file_path, mode="wb") as f:
|
with open(file_path, mode="wb") as f:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user