class Fog::Storage::Local::Directories
Public Instance Methods
all()
click to toggle source
# File lib/fog/storage/local/models/directories.rb, line 7 def all data = if ::File.directory?(service.local_root) Dir.entries(service.local_root).select do |entry| entry[0...1] != '.' && ::File.directory?(service.path_to(entry)) end.map do |entry| {:key => entry} end else [] end load(data) end
get(key, options = {})
click to toggle source
# File lib/fog/storage/local/models/directories.rb, line 20 def get(key, options = {}) create_directory(key, options) if ::File.directory?(service.path_to(key)) end
Private Instance Methods
create_directory(key, options)
click to toggle source
# File lib/fog/storage/local/models/directories.rb, line 25 def create_directory(key, options) options[:path] ? new(key: key + options[:path]) : new(key: key) end