class FDB::DirectoryLayer

def list(db_or_tr, path=[])

def list(db_or_tr, path=[])
  db_or_tr.transact do |tr|
    check_version(tr, false)
    path = to_unicode_path(path)
    node = find(tr, path).prefetch_metadata(tr)
    raise ArgumentError, 'The directory does not exist.' unless node.exists?
    if node.is_in_partition?(nil, true)
      next node.get_contents(self).list(tr, node.get_partition_subpath)
    end
    subdir_names_and_nodes(tr, node.subspace).map { |name, node| name }
  end
end