MCPcopy Index your code
hub / github.com/python/cpython / mkdir

Method mkdir

Lib/pathlib/__init__.py:1204–1219  ·  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

1202 os.close(fd)
1203
1204 def mkdir(self, mode=0o777, parents=False, exist_ok=False):
1205 """
1206 Create a new directory at this given path.
1207 """
1208 try:
1209 os.mkdir(self, mode)
1210 except FileNotFoundError:
1211 if not parents or self.parent == self:
1212 raise
1213 self.parent.mkdir(parents=True, exist_ok=True)
1214 self.mkdir(mode, parents=False, exist_ok=exist_ok)
1215 except OSError:
1216 # Cannot rely on checking for EEXIST, since the operating system
1217 # could give priority to other errors like EACCES or EROFS
1218 if not exist_ok or not self.is_dir():
1219 raise
1220
1221 def chmod(self, mode, *, follow_symlinks=True):
1222 """

Callers 15

mainFunction · 0.45
write_glossary_jsonFunction · 0.45
subdirFunction · 0.45
downloadFunction · 0.45
configure_host_pythonFunction · 0.45
setup_testbedFunction · 0.45
packageFunction · 0.45
fetch_zipFunction · 0.45
fetch_releaseFunction · 0.45
wrapperFunction · 0.45
install_emscriptenFunction · 0.45

Calls 1

is_dirMethod · 0.95

Tested by

no test coverage detected