PyDocs

Nav

Generic Operating System Services

mkdir

os

function
  • mkdir(path, mode=0o777, *, dir_fd=None)
Create a directory.

If dir_fd is not None, it should be a file descriptor open to
a directory, and path should be relative; path will then be relative to
that directory.
dir_fd may not be implemented on your platform.  If it is unavailable,
using it will raise a NotImplementedError.

The mode argument is ignored on Windows.  Where it is used, the current
umask value is first masked out.
Changed in 3.3, 3.6, 3.13
  • 3.3: Added the dir_fd parameter.
  • 3.6: Accepts a path-like object.
  • 3.13: Windows now handles a mode of 0o700.
0 Examples
No examples for os/mkdir.
See Also
No see-alsos for os/mkdir
0 Notes
No notes for mkdir