def list_directory(project_tree, directory):
  try:
    path = normpath(directory.path)
    entries = [join(path, e) for e in project_tree.listdir(path)]
    return DirectoryListing(directory,
                            True,
                            tuple(Path(e) for e in entries))
  except (IOError, OSError) as e:
    if e.errno == errno.ENOENT:
      return DirectoryListing(directory, False, tuple())
    else:
      raise e
List Paths directly below the given path, relative to the ProjectTree.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/engine/exp/fs.py/list_directory