Class: Bosh::Stemcell::ArchiveHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/stemcell/archive_handler.rb

Instance Method Summary collapse

Constructor Details

#initializeArchiveHandler

Returns a new instance of ArchiveHandler.


3
4
5
# File 'lib/bosh/stemcell/archive_handler.rb', line 3

def initialize
  @shell = Bosh::Core::Shell.new
end

Instance Method Details

#compress(directory, archive_filename) ⇒ Object


7
8
9
# File 'lib/bosh/stemcell/archive_handler.rb', line 7

def compress(directory, archive_filename)
  @shell.run("sudo tar -cz -f #{archive_filename} -C #{directory} .")
end