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

Method mkdir

tests/common.py:240–259  ·  view source on GitHub ↗

Create a directory with a given name If dirname is not absolute, it will be created in self.tempdir. Returns the path to the created directory.

(self, dirname)

Source from the content-addressed store, hash-verified

238 return filename
239
240 def mkdir(self, dirname):
241 """Create a directory with a given name
242
243 If dirname is not absolute, it will be created in self.tempdir.
244
245 Returns the path to the created directory.
246 """
247 assert isinstance(dirname, str)
248 if not os.path.isabs(dirname):
249 dirname = os.path.join(self.tempdir, dirname)
250 ext_dirname = extended_path(dirname)
251 os.makedirs(ext_dirname, exist_ok=True)
252 self.assertExists(ext_dirname)
253 self.assertTrue(os.path.isdir(ext_dirname))
254 self.assertFalse(is_hard_link(ext_dirname))
255 self.assertTrue(is_normal_directory(ext_dirname))
256 self.assertFalse(os.path.isfile(ext_dirname))
257 if os.name == 'nt':
258 self.assertFalse(Windows.is_junction(ext_dirname))
259 return dirname
260
261 def mkstemp(self, **kwargs):
262 if 'dir' not in kwargs:

Calls 5

assertExistsMethod · 0.95
extended_pathFunction · 0.90
is_hard_linkFunction · 0.90
is_normal_directoryFunction · 0.90
joinMethod · 0.80