Sha256: d51cff9072568c12c081f152f6c4f32e9509312c224f21829fae7c3aafa80a8f
Contents?: true
Size: 524 Bytes
Versions: 8
Compression:
Stored size: 524 Bytes
Contents
require 'fog/local' module Adhoq module Storage class LocalFile < FogStorage attr_reader :root def initialize(root_path) path = Pathname.new(root_path) @fog = Fog::Storage.new(provider: 'Local', local_root: path.parent) @dir = path.basename.to_s end def identifier "file://#{[@fog.local_root, @dir].join('/')}" end private def directory @fog.directories.get(@dir) || @fog.directories.create(key: @dir) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems