MCPcopy Create free account
hub / github.com/OpenImagingLab/4DSloMo / mkdir_p

Function mkdir_p

utils/system_utils.py:16–24  ·  view source on GitHub ↗
(folder_path)

Source from the content-addressed store, hash-verified

14import os
15
16def mkdir_p(folder_path):
17 # Creates a directory. equivalent to using mkdir -p on the command line
18 try:
19 makedirs(folder_path)
20 except OSError as exc: # Python >2.5
21 if exc.errno == EEXIST and path.isdir(folder_path):
22 pass
23 else:
24 raise
25
26def searchForMaxIteration(folder):
27 saved_iters = [int(fname.split("_")[-1]) for fname in os.listdir(folder)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected