fs/open
This commit is contained in:
parent
0a9404fb2f
commit
ef45fc9d81
1 changed files with 2 additions and 2 deletions
|
@ -77,5 +77,5 @@ def wipe(path: str) -> None:
|
||||||
|
|
||||||
def write(file_path: str, text: str, charset: str = CHARSET) -> None:
|
def write(file_path: str, text: str, charset: str = CHARSET) -> None:
|
||||||
"""Write text into a file."""
|
"""Write text into a file."""
|
||||||
with open(file_path, "bw") as file_object:
|
with Path(file_path).open(mode="w", encoding=charset) as file_object:
|
||||||
file_object.write(text.encode(charset))
|
file_object.write(text)
|
||||||
|
|
Loading…
Reference in a new issue