247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
|
# File 'lib/fdbdirectory.rb', line 247
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
|