MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / mkdir

Method mkdir

tools/python-3.11.9-amd64/Lib/pathlib.py:1111–1126  ·  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

1109 os.close(fd)
1110
1111 def mkdir(self, mode=0o777, parents=False, exist_ok=False):
1112 """
1113 Create a new directory at this given path.
1114 """
1115 try:
1116 os.mkdir(self, mode)
1117 except FileNotFoundError:
1118 if not parents or self.parent == self:
1119 raise
1120 self.parent.mkdir(parents=True, exist_ok=True)
1121 self.mkdir(mode, parents=False, exist_ok=exist_ok)
1122 except OSError:
1123 # Cannot rely on checking for EEXIST, since the operating system
1124 # could give priority to other errors like EACCES or EROFS
1125 if not exist_ok or not self.is_dir():
1126 raise
1127
1128 def chmod(self, mode, *, follow_symlinks=True):
1129 """

Callers 15

makedirMethod · 0.45
mkdtempFunction · 0.45
__init__Method · 0.45
__init__Method · 0.45
checkMethod · 0.45
GetUserCfgDirMethod · 0.45
mkpathFunction · 0.45
test_runMethod · 0.45
test_basic_discoveryMethod · 0.45
test_newer_pairwiseMethod · 0.45

Calls 1

is_dirMethod · 0.95

Tested by 15

checkMethod · 0.36
test_runMethod · 0.36
test_basic_discoveryMethod · 0.36
test_newer_pairwiseMethod · 0.36
test_newer_groupMethod · 0.36
test_quietMethod · 0.36
test_no_optimize_flagMethod · 0.36
setUpMethod · 0.36
test_prune_file_listMethod · 0.36
test_add_defaultsMethod · 0.36