Method: Fog::Storage::Atmos::Directories#get
- Defined in:
- lib/fog/atmos/models/storage/directories.rb
#get(key, options = {}) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/fog/atmos/models/storage/directories.rb', line 28 def get(key, = {}) return nil if key == '' # Root dir shouldn't be retrieved like this. key =~ /\/$/ ? ns = key : ns = key + '/' res = service.get_namespace ns = res.headers['x-emc-meta'] obj_id = .scan(/objectid=(\w+),/).flatten[0] new(:objectid => obj_id, :key => ns) rescue Fog::Storage::Atmos::NotFound nil end |