class SevenZip::Archive
Public Instance Methods
add(file, **opts)
click to toggle source
# File lib/cli_chef/apps/sevenzip/archive.rb, line 23 def add(file, **opts) SevenZip.add(path, file, **opts) end
delete(file, **opts)
click to toggle source
# File lib/cli_chef/apps/sevenzip/archive.rb, line 27 def delete(file, **opts) SevenZip.delete(path, file, **opts) end
extract(**opts)
click to toggle source
# File lib/cli_chef/apps/sevenzip/archive.rb, line 19 def extract(**opts) SevenZip.extract(path, **opts) end
size()
click to toggle source
# File lib/cli_chef/apps/sevenzip/archive.rb, line 15 def size ::File.size(path) end
Protected Instance Methods
load_archive()
click to toggle source
# File lib/cli_chef/apps/sevenzip/archive.rb, line 33 def load_archive self.files.clear items = SevenZip.list(self.path) items.map { |i| i.archive = self } self.dirs = items.find_all { |i| i.is_a?(Dir) } self.files = items.find_all { |i| !i.is_a?(Dir) } true end