Source code for ssp.utils.misc
#!/usr/bin/env python
__author__ = "Mageswaran Dhandapani"
__copyright__ = "Copyright 2020, The Spark Structured Playground Project"
__credits__ = []
__license__ = "Apache License"
__version__ = "2.0"
__maintainer__ = "Mageswaran Dhandapani"
__email__ = "mageswaran1989@gmail.com"
__status__ = "Education Purpose"
import os
import shutil
[docs]def check_n_mk_dirs(path, is_remove=False):
if os.path.exists(path):
if is_remove:
shutil.rmtree(path)
else:
os.makedirs(path)