Sha256: 7dff4bb61cd0d1290a66024b39bdc00121474c3dbacc3a2c0037f14e1ce6470e
Contents?: true
Size: 674 Bytes
Versions: 36
Compression:
Stored size: 674 Bytes
Contents
require 'fog/core/collection' require 'fog/local/models/storage/directory' module Fog module Storage class Local class Directories < Fog::Collection model Fog::Storage::Local::Directory def all data = Dir.entries(connection.local_root).select do |entry| entry[0...1] != '.' && ::File.directory?(connection.path_to(entry)) end.map do |entry| {:key => entry} end load(data) end def get(key) if ::File.directory?(connection.path_to(key)) new(:key => key) else nil end end end end end end
Version data entries
36 entries across 36 versions & 13 rubygems