Skip to content
Snippets Groups Projects
Verified Commit fba3afaf authored by rahix's avatar rahix
Browse files

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


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent c7e40e27
No related branches found
No related tags found
No related merge requests found
Pipeline #4194 passed
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment