2010-05-02 05:10:11 +00:00
|
|
|
module Local
|
|
|
|
class << self
|
|
|
|
if Fog.credentials[:local_root]
|
|
|
|
|
|
|
|
def initialized?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
def [](service)
|
|
|
|
@@connections ||= Hash.new do |hash, key|
|
|
|
|
hash[key] = case key
|
|
|
|
when :files
|
2010-09-02 20:39:01 +00:00
|
|
|
Fog::Local.new
|
2010-05-02 05:10:11 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
@@connections[service]
|
|
|
|
end
|
|
|
|
|
|
|
|
def directories
|
|
|
|
self[:files].directories
|
|
|
|
end
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
def initialized?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|