Create a btrfs subvolume in the specified path
        :param path: path to create
322755
def subvol_create(self, path):
        
        args = {
            'path': path
        }
        self._subvol_chk.check(args)
        self._client.sync('btrfs.subvol_create', args)
1324205
def explode_azure_path(path):
    # type: (str) -> Tuple[str, str]
    
    rpath = normalize_azure_path(path).split('/')
    container = str(rpath[0])
    if len(rpath) > 1:
        rpath = '/'.join(rpath[1:])
    else:
        rpath = ''
    return container, rpath
204480
def make_nfs_path(path):
    """"""
    if os.path.isabs(path):
        fullpath = path
    else:
        fullpath = os.path.abspath(path)
    if len(fullpath) < 6:
        return fullpath
    if fullpath[0:6] == '/gpfs/':
        fullpath = fullpath.replace('/gpfs/', '/nfs/')
    return fullpath
1368760
function (path) {
    var pathSep = require('path').sep;
    var dirs = path.split(pathSep);
    var root = '';

    while (dirs.length > 0) {
      var dir = dirs.shift();
      if (dir === '') {
        root = pathSep;
      }
      if (!fs.existsSync(root + dir)) {
        fs.mkdirSync(root + dir);
      }
      root += dir + pathSep;
    }
  }
985741
def make_dirs(path):
        
        try:
            os.makedirs(os.path.dirname(path))
        except OSError as err:
            if err.errno != errno.EEXIST:
                LOGGER.error('Failed to create directory %s with error: %s' % (path, str(err)))
                raise
1191114
def add(self, path):
        '''
        
        '''
        with salt.utils.files.fopen(path, 'rb') as ifile:
            for chunk in iter(lambda: ifile.read(self.__buff), b''):
                self.__digest.update(chunk)
1028890
def safe_makedirs(path):
    
    if not os.path.exists(path):
        try:
            os.makedirs(path)
        except OSError:
            if not os.path.exists(path):
                raise
441692
def subkeys(self, path):
        
        for _ in subpaths_for_path_range(path, hardening_chars="'pH"):
            yield self.subkey(_)
573646
def subvolume_set_default(subvolid, path):
    '''
    

    '''
    cmd = ['btrfs', 'subvolume', 'set-default', subvolid, path]

    res = __salt__['cmd.run_all'](cmd)
    salt.utils.fsutils._verify_run(res)
    return True
721698
def sub_path(self, path):
        
        if not self.regular_expression:
            return self.new_path
        return re.sub(self.old_path, self.new_path, path)
40860
def subkeys(self, path):
        
        for _ in subpaths_for_path_range(path, hardening_chars="'pH"):
            yield self.subkey_for_path(_)
322775
def make_dir(self, path, relative=False):
        
        if not relative:
            path = self.relpath(path)
        self._make_dir(self.get_client_kwargs(self.ensure_dir_path(
            path, relative=True)))
417324
def create_directory(self, path):
        
        _complain_ifclosed(self.closed)
        return self.fs.create_directory(path)
907273
def add_path(self, path):
        
        abspath = os.path.abspath(path)
        self.children.append(_build_project_tree(abspath, self.followsymlinks, self.file_filter))
231337
def create_directory(self, path=None):
        
        if path is None:
            path = self.get_path()
        if not os.path.exists(path):
            os.makedirs(path)
1236210
def subvolume_get_default(path):
    '''
    

    '''
    cmd = ['btrfs', 'subvolume', 'get-default', path]

    res = __salt__['cmd.run_all'](cmd)
    salt.utils.fsutils._verify_run(res)

    line = res['stdout'].strip()
    # The ID is the second parameter, and the name the last one, or
    # '(FS_TREE)'
    #
    # When the default one is set:
    # ID 5 (FS_TREE)
    #
    # When we manually set a different one (var):
    # ID 257 gen 8 top level 5 path var
    #
    id_ = line.split()[1]
    name = line.split()[-1]
    return {
        'id': id_,
        'name': name,
    }
549430
def make_path_relative(path):
    
    if os.path.isabs(path):
        drive_s,path = os.path.splitdrive(path)

        import re
        if not drive_s:
            path=re.compile("/*(.*)").findall(path)[0]
        else:
            path=path[1:]

    assert( not os.path.isabs( path ) ), path
    return path