22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/fog/google/models/storage/files.rb', line 22
def all(options = {})
requires :directory
options = {
'delimiter' => delimiter,
'marker' => marker,
'max-keys' => max_keys,
'prefix' => prefix
}.merge!(options)
options = options.reject {|key,value| value.nil? || value.to_s.empty?}
merge_attributes(options)
parent = directory.collection.get(
directory.key,
options
)
if parent
merge_attributes(parent.files.attributes)
load(parent.files.map {|file| file.attributes})
else
nil
end
end
|