Method: Fog::Storage::HP::Files#all

Defined in:
lib/fog/hp/models/storage/files.rb

#all(options = {}) ⇒ Object


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/fog/hp/models/storage/files.rb', line 18

def all(options = {})
  requires :directory
  options = {
    'limit'   => limit,
    'marker'  => marker,
    'path'    => path,
    'prefix'  => prefix
  }.merge!(options)
  merge_attributes(options)
  parent = directory.collection.get(
    directory.key,
    options
  )
  if parent
    load(parent.files.map {|file| file.attributes})
  else
    nil
  end
end