class Fog::Storage::Dtdream::Directories
Public Instance Methods
all()
click to toggle source
# File lib/fog/dtdream/models/storage/directories.rb, line 10 def all containers = service.get_containers() if nil == containers return nil end data = Array.new i = 0 containers.each do |entry| key = entry["Prefix"][0] key[-1] = '' data[i] = {:key=>key} i = i + 1 end load(data) end
get(key, options = {})
click to toggle source
# File lib/fog/dtdream/models/storage/directories.rb, line 27 def get(key, options = {}) if key != nil && key != "" && key != '.' dir = key+'/' ret = service.head_object(dir, options) if ret.data[:status] == 200 new(:key => key) else nil end else new(:key => "") end rescue Fog::Storage::Dtdream::NotFound nil end