Source code for gluoncv.utils.filesystem
"""Filesystem utility functions."""
import os
import errno
[docs]def makedirs(path):
"""Create directory recursively if not exists.
Similar to `makedir -p`, you can skip checking existance before this function.
Parameters
----------
path : str
Path of the desired dir
"""
try:
os.makedirs(path)
except OSError as exc:
if exc.errno != errno.EEXIST:
raise