Method: Bosh::Cli::Command::BlobManagement#add
- Defined in:
- lib/cli/commands/blob_management.rb
#add(local_path, blob_dir = nil) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/cli/commands/blob_management.rb', line 19 def add(local_path, blob_dir = nil) blob_path = File.basename(local_path) if blob_dir # We don't need 'blobs/' prefix, # but it might be handy for people who rely on auto-completion if blob_dir[0..5] == "blobs/" blob_dir = blob_dir[6..-1] end blob_path = File.join(blob_dir, blob_path) end blob_manager.add_blob(local_path, blob_path) end |