code: def listdir(self, relpath):
      
  
      path = self._realpath(relpath)
      if not path.endswith('/'):
        raise self.NotADirException(self.rev, relpath)
  
      if path[0] == '/' or path.startswith('../'):
        return os.listdir(path)
  
      tree = self._read_tree(path[:-1])
      return list(tree.keys())
docs: Like os.listdir, but reads from the git repository.
  
      :returns: a list of relative filenames