def listdir(self, path_parts, rev, options): path = self._getpath(path_parts) if self.itemtype(path_parts, rev) != vclib.DIR: # does auth-check raise vclib.Error("Path '%s' is not a directory." % path) rev = self._getrev(rev) entries = [] dirents, locks = self._get_dirents(path, rev) for name, entry in dirents.items(): pathtype = _kind2type(entry.kind) entries.append(vclib.DirEntry(name, pathtype)) return entries
def listdir(self, path_parts, rev, options): path = self._getpath(path_parts) rev = self._getrev(rev) entries = [] dirents = self._get_dirents(path, rev) for name in dirents.keys(): entry = dirents[name] if entry.kind == core.svn_node_dir: kind = vclib.DIR elif entry.kind == core.svn_node_file: kind = vclib.FILE entries.append(vclib.DirEntry(name, kind)) return entries
def listdir(self, path_parts, rev, options): path = self._getpath(path_parts) if self.itemtype(path_parts, rev) != vclib.DIR: # does auth-check raise vclib.Error("Path '%s' is not a directory." % path) rev = self._getrev(rev) fsroot = self._getroot(rev) dirents = fs.dir_entries(fsroot, path) entries = [] for entry in dirents.values(): kind = _kind2type(entry.kind) ent_path = _to_str(entry.name) if vclib.check_path_access(self, path_parts + [ent_path], kind, rev): entries.append(vclib.DirEntry(ent_path, kind)) return entries
def listdir(self, path_parts, rev, options): path = self._getpath(path_parts) if self.itemtype(path_parts, rev) != vclib.DIR: # does auth-check raise vclib.Error("Path '%s' is not a directory." % path) rev = self._getrev(rev) fsroot = self._getroot(rev) dirents = fs.dir_entries(fsroot, path) entries = [ ] for entry in dirents.values(): if entry.kind == core.svn_node_dir: kind = vclib.DIR elif entry.kind == core.svn_node_file: kind = vclib.FILE if vclib.check_path_access(self, path_parts + [entry.name], kind, rev): entries.append(vclib.DirEntry(entry.name, kind)) return entries
def listdir(self, path_parts, rev, options): path = self._getpath(path_parts) if self.itemtype(path_parts, rev) != vclib.DIR: # does auth-check raise vclib.Error("Path '%s' is not a directory." % path) rev = self._getrev(rev) entries = [] dirents, locks = self._get_dirents(path, rev) for name in dirents.keys(): entry = dirents[name] if entry.kind == core.svn_node_dir: kind = vclib.DIR elif entry.kind == core.svn_node_file: kind = vclib.FILE if vclib.check_path_access(self, path_parts + [name], kind, rev): entries.append(vclib.DirEntry(name, kind)) return entries
def listdir(self, path_parts, rev, options): basepath = self._getpath(path_parts) if self.itemtype(path_parts, rev) != vclib.DIR: raise vclib.Error("Path '%s' is not a directory." % basepath) rev = self._getrev(rev) fsroot = self._getroot(rev) dirents = fs.dir_entries(fsroot, basepath, self.scratch_pool) entries = [] for entry in dirents.values(): if entry.kind == core.svn_node_dir: kind = vclib.DIR elif entry.kind == core.svn_node_file: kind = vclib.FILE entries.append(vclib.DirEntry(entry.name, kind)) self._scratch_clear() return entries