Ejemplo n.º 1
0
  def getDirents(self, path):
    returned = []
    for dirent in View.getDirents(self, path):
      returned.append(dirent.filename)
      yield dirent

    if not path.count(os.sep):
      for friend in self._pendingFriends:
        if friend['fullname'] not in returned:
          yield self.docClass(filename=friend['fullname'], mode=0555 | stat.S_IFDIR,
                              uid=friend['uid'], gid=friend['gid'])
        else:
          returned.remove(friend['fullname'])
Ejemplo n.º 2
0
    def getDirents(self, path):
        """
    Add to the result of getDirent on the parent call View,
    and add the pending tags dir to the dirents if path is at 'tag' level.
    """

        returned = []
        for dirent in View.getDirents(self, path):
            yield dirent
            returned.append(dirent.filename)

        if not path.count(os.sep):
            for tag in self._pendingTags:
                if tag not in returned:
                    yield self.docClass(filename=tag, mode=0555 | stat.S_IFDIR)
                else:
                    returned.remove(tag)