Apply a quota to a btrfs subvolume in the specified path
        :param path:  path to apply the quota for (it has to be the path of the subvol)
        :param limit: the limit to Apply
320827
def subvol_quota(self, path, limit):
        
        args = {
            'path': path,
            'limit': limit,
        }

        self._subvol_quota_chk.check(args)

        self._client.sync('btrfs.subvol_quota', args)
522152
def usage(path):
    '''
    
    '''
    out = __salt__['cmd.run_all']("btrfs filesystem usage {0}".format(path))
    salt.utils.fsutils._verify_run(out)

    ret = {}
    for section in out['stdout'].split("\n\n"):
        if section.startswith("Overall:\n"):
            ret['overall'] = _usage_overall(section)
        elif section.startswith("Unallocated:\n"):
            ret['unallocated'] = _usage_unallocated(section)
        else:
            ret.update(_usage_specific(section))

    return ret
375866
def mount(self, path, mount):
        
        self._mountpoints[self._join_chunks(self._normalize_path(path))] = mount
744342
def expanduser(self, path):
        
        return self._os_path.expanduser(path).replace(
            self._os_path.sep, self.sep)
981205
def relpath(self, path):
        
        return os.path.relpath(path, start=self.path)
675765
def update_quota(self, project_id, body=None):
        """"""
        return self.put(self.quota_path % (project_id), body=body)
705955
def add_path(self, path):
        

        if os.path.exists(path):
            self.paths.add(path)
            return path
        else:
            #logger.debug('Path {} doesn\'t exist'.format(path))
            return None
795171
def create_bandwidth_limit_rule(self, policy, body=None):
        """"""
        return self.post(self.qos_bandwidth_limit_rules_path % policy,
                         body=body)
536041
def fill(self, path):
        '''
        
        '''
        self.bindir = set(os.listdir(path + 'bin/'))
        self.lib_sitepackages = set(os.listdir(glob.glob(
            path + 'lib/python?.?/site-packages/')[0]))
575713
def parse_limits_file(path):
    

    context = FilePathContext(path)

    format = resolve_format(None, context.filepath)
    if format == 'tsv':
        logger.debug('Parsing limits file {} as TSV'.format(
            context.filepath))
        with context.open('r') as f:
            for limit in parse_limits_table_file(f):
                yield limit
    elif format == 'yaml':
        logger.debug('Parsing limits file {} as YAML'.format(
            context.filepath))
        with context.open('r') as f:
            for limit in parse_limits_yaml_file(context, f):
                yield limit
    else:
        raise ParseError('Unable to detect format of limits file {}'.format(
            context.filepath))
1305923
def set_path(self, file_path):
        
        if not file_path:
            self.read_data = self.memory_read
            self.write_data = self.memory_write
        elif not is_valid(file_path):
            self.write_data(file_path, {})

        self.path = file_path
874487
def patch_lustre_path(f_path):
    """"""

    if CHECK_LUSTRE_PATH_LEN and len(f_path) == 60:
        if os.path.isabs(f_path):
            f_path = '/.' + f_path
        else:
            f_path = './' + f_path

    return f_path
260555
def scandir_limited(top, limit, deep=0):
    
    deep += 1
    try:
        scandir_it = Path2(top).scandir()
    except PermissionError as err:
        log.error("scandir error: %s" % err)
        return

    for entry in scandir_it:
        if entry.is_dir(follow_symlinks=False):
            if deep < limit:
                yield from scandir_limited(entry.path, limit, deep)
            else:
                yield entry
156416
def count(self, path):
        
        try:
            res = self.get_bite().count(self.list_path(path)).next()
            dir_count = res['directoryCount']
            file_count = res['fileCount']
            content_size = res['spaceConsumed']
        except StopIteration:
            dir_count = file_count = content_size = 0
        return {'content_size': content_size, 'dir_count': dir_count,
                'file_count': file_count}
441692
def subkeys(self, path):
        
        for _ in subpaths_for_path_range(path, hardening_chars="'pH"):
            yield self.subkey(_)
224628
function (subpath, f) {
    var args = Util.resolveArgs(arguments, '?subpath', 'f');
    update(this, args.subpath, args.f);
    return this;
  }
1235266
private void visit_OP_SET_QUOTA() throws IOException {
    visitTxId();
    v.visitStringUTF8( EditsElement.PATH);
    v.visitLong(       EditsElement.NS_QUOTA);
    v.visitLong(       EditsElement.DS_QUOTA);
  }