MCPcopy Index your code
hub / github.com/RustPython/RustPython / mkdir

Method mkdir

Lib/pathlib/__init__.py:1006–1021  ·  view source on GitHub ↗

Create a new directory at this given path.

(self, mode=0o777, parents=False, exist_ok=False)

Source from the content-addressed store, hash-verified

1004 os.close(fd)
1005
1006 def mkdir(self, mode=0o777, parents=False, exist_ok=False):
1007 """
1008 Create a new directory at this given path.
1009 """
1010 try:
1011 os.mkdir(self, mode)
1012 except FileNotFoundError:
1013 if not parents or self.parent == self:
1014 raise
1015 self.parent.mkdir(parents=True, exist_ok=True)
1016 self.mkdir(mode, parents=False, exist_ok=exist_ok)
1017 except OSError:
1018 # Cannot rely on checking for EEXIST, since the operating system
1019 # could give priority to other errors like EACCES or EROFS
1020 if not exist_ok or not self.is_dir():
1021 raise
1022
1023 def chmod(self, mode, *, follow_symlinks=True):
1024 """

Callers 15

makedirMethod · 0.45
mkdtempFunction · 0.45
__init__Method · 0.45
__init__Method · 0.45
_copy_fromMethod · 0.45
set_dataMethod · 0.45
_write_contentsFunction · 0.45
__enter__Method · 0.45
stdlib_os.pyFile · 0.45
quickFunction · 0.45
_copy_singleFunction · 0.45
_get_cache_pathFunction · 0.45

Calls 1

is_dirMethod · 0.95