Sha256: 2746c7c8c7c4e6ab53c6d74a7dd2a7baff98d3819ed47373f95fb9dc9f250176
Contents?: true
Size: 518 Bytes
Versions: 8
Compression:
Stored size: 518 Bytes
Contents
require 'fog' 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