From fba3afafc42af13efe528c07356f2ce56aee5d15 Mon Sep 17 00:00:00 2001 From: Rahix <rahix@rahix.de> Date: Sat, 9 Nov 2019 16:10:27 +0100 Subject: [PATCH] docs: Document os.mkdir() and os.rename() Signed-off-by: Rahix <rahix@rahix.de> --- Documentation/pycardium/os.rst | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Documentation/pycardium/os.rst b/Documentation/pycardium/os.rst index 2447ccfe..d2fd7cf2 100644 --- a/Documentation/pycardium/os.rst +++ b/Documentation/pycardium/os.rst @@ -8,12 +8,6 @@ functions found in CPythons ``os`` module. CPython-Like ------------ -.. py:function:: unlink(path) - - Unlink (remove) a file. - - :param str path: The file to remove. - .. py:function:: listdir(dir) List contents of a directory. @@ -22,6 +16,28 @@ CPython-Like :returns: A list of entities (files or subdirectories) in the directory ``dir``. +.. py:function:: mkdir(path) + + Create a directory named *path*. + + :param str path: Path to the directory to create. Only the last component + of this path will be created. + +.. py:function:: rename(src, dst) + + Rename the file or directory *src* to *dst*. If *dst* exists, the operation + will fail. + + :param str src: Path to source file to rename. + :param str dst: Destination path to rename to. Must not exist before + calling :py:func:`os.rename`. + +.. py:function:: unlink(path) + + Unlink (remove) a file. + + :param str path: The file to remove. + .. py:function:: urandom(n) Return ``n`` random bytes. -- GitLab