MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / mkdir_p

Function mkdir_p

tensorpack/utils/fs.py:16–29  ·  view source on GitHub ↗

Like "mkdir -p", make a dir recursively, but do nothing if the dir exists Args: dirname(str):

(dirname)

Source from the content-addressed store, hash-verified

14
15
16def mkdir_p(dirname):
17 """ Like "mkdir -p", make a dir recursively, but do nothing if the dir exists
18
19 Args:
20 dirname(str):
21 """
22 assert dirname is not None
23 if dirname == '' or os.path.isdir(dirname):
24 return
25 try:
26 os.makedirs(dirname)
27 except OSError as e:
28 if e.errno != errno.EEXIST:
29 raise e
30
31
32def download(url, dir, filename=None, expect_size=None):

Callers 5

downloadFunction · 0.85
get_dataset_pathFunction · 0.85
set_logger_dirFunction · 0.85
dump_dataflow_imagesFunction · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected