From eb0f8621252b0daf3f83545d1754adf877dc3920 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 17 Sep 2024 23:05:00 +0200 Subject: [PATCH] doc/write --- rwx/fs/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index 1b9e811..7595335 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -83,6 +83,14 @@ def wipe(path: Path) -> None: def write(file_path: Path, text: str, charset: str = CHARSET) -> None: - """Write text into a file.""" + """Write text into a file. + + :param file_path: target file path + :type file_path: Path + :param text: content to write + :type text: str + :param charset: charset to use for encoding ouput + :type charset: str + """ with file_path.open(encoding=charset, mode="w") as file_object: file_object.write(text)