Verified Commit fba3afaf authored by Rahix's avatar Rahix
Browse files

docs: Document os.mkdir() and os.rename()


Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent c7e40e27
Pipeline #4194 passed with stages
in 1 minute and 37 seconds
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment