Class: Bosh::Blobstore::LocalClient

Inherits:
BaseClient show all
Defined in:
lib/blobstore_client/local_client.rb

Constant Summary collapse

CHUNK_SIZE =
1024 * 1024

Constants inherited from Client

Client::PROVIDER_NAMES, Client::VERSION

Instance Method Summary collapse

Methods inherited from BaseClient

#create, #delete, #exists?, #get

Methods inherited from Client

create, safe_create

Constructor Details

#initialize(options) ⇒ LocalClient

Returns a new instance of LocalClient.



8
9
10
11
12
13
# File 'lib/blobstore_client/local_client.rb', line 8

def initialize(options)
  super(options)
  @blobstore_path = URI(@options[:blobstore_path]).path
  raise "No blobstore path given in options #{@options}" if @blobstore_path.nil?
  FileUtils.mkdir_p(@blobstore_path) unless File.directory?(@blobstore_path)
end