docs: def _listdir(self, root):
          "List directory 'root' appending the path separator to subdirs."
          res = []
          for name in os.listdir(root):
              path = os.path.join(root, name)
              if os.path.isdir(path):
                  name += os.sep
              res.append(name)
          return res