makes all the directories along a given path, if they do not exist
425759
def mkdir_recursive(dirname):
    """"""
    parent = os.path.dirname(dirname)
    if parent != "":
        if not os.path.exists(parent):
            mkdir_recursive(parent)
        if not os.path.exists(dirname):
            os.mkdir(dirname)
    elif not os.path.exists(dirname):
        os.mkdir(dirname)
205173
def makedirs(path, mode=0o777, exist_ok=False):
    """"""
    os.makedirs(path, mode, exist_ok)
925848
def path_exists(self, path, follow_symlinks=True):
        ""
        return (
            self.file_exists(path, follow_symlinks)
            or self.symlink_exists(path, follow_symlinks)
            or self.directory_exists(path, follow_symlinks)
        )
421325
def ensure_dir_exists(f, fullpath=False):
    
    if fullpath is False:
        # Get parent directory
        d = os.path.dirname(f)
    else:
        # Create the full path
        d = f
    if not os.path.exists(d):
        os.makedirs(d)
64176
def ensure_dir(path):
    """"""
    if not (os.path.exists(path) and
            os.path.isdir(path)):
        os.mkdir(path)
1255035
def mkdir(self, path):
        """"""

        resp = self._sendRequest("MKCOL", path)
        if resp.status_code != 201:
            if resp.status_code == 409:
                raise YaDiskException(409, "Part of path {} does not exists".format(path))
            elif resp.status_code == 405:
                raise YaDiskException(405, "Path {} already exists".format(path))
            else:
                raise YaDiskException(resp.status_code, resp.content)
1007415
def ensure_dir(path):
        
        try:
            makedirs(path)
        except OSError as e:  # pragma: no cover
            if e.errno == errno.EEXIST and isdir(path):
                return (True, 'exists')
            else:
                return (False, e)
        return (True, path)
1132171
def make_dir(cls, directory_name):
        """"""
        if not os.path.exists(directory_name):
            os.makedirs(directory_name)
1028890
def safe_makedirs(path):
    
    if not os.path.exists(path):
        try:
            os.makedirs(path)
        except OSError:
            if not os.path.exists(path):
                raise
248910
def create_dir_rec(path: Path):
    
    if not path.exists():
        Path.mkdir(path, parents=True, exist_ok=True)
1151673
def _mkdir(path):
    
    try:
        os.mkdir(path)
    except OSError as e:
        if e.errno == 17:
            show_error("ABORTING: Directory {0} already exists.".format(path))
        else:
            show_error("ABORTING: OSError {0}".format(e))
        sys.exit()
1022416
function mkdirs(folderPath, mode) {
  var folders = [];
  var tmpPath = path.normalize(folderPath);
  var exists = fs.existsSync(tmpPath);
  while (!exists) {
    folders.push(tmpPath);
    tmpPath = path.join(tmpPath, '..');
    exists = fs.existsSync(tmpPath);
  }

  for (var i = folders.length - 1; i >= 0; i--) {
    fs.mkdirSync(folders[i], mode);
  }
}
243806
def ensure_path_exists(dir_path):
    
    if not os.path.exists(dir_path):
        mkdir(dir_path)
        return True
    return False
1250143
def makedirs_perm(path, perm=None):
    
    if not os.path.exists(path):
        if perm is None:
            os.makedirs(path)
        else:
            umask = os.umask(0)
            try:
                os.makedirs(path, perm)
            finally:
                os.umask(umask)
1338191
def ensure_dir(f):
    
    d = os.path.dirname(f)
    if not os.path.exists(d):
        os.makedirs(d)
505945
def ensure_dirs(filename):
    """"""
    dirname, _ = os.path.split(filename)
    if dirname and not os.path.exists(dirname):
        os.makedirs(dirname)
897216
def ensure_dir(path):
    
    dirpath = os.path.dirname(path)
    if dirpath and not os.path.exists(dirpath):
        os.makedirs(dirpath)