class Mixlib::Archive::LibArchive
def extract(destination, perms: true, ignore: [])
perms
=== Parameters
Extracts the archive to the given +destination+
def extract(destination, perms: true, ignore: []) ignore_re = Regexp.union(ignore) flags = perms ? ::Archive::EXTRACT_PERM : nil FileUtils.mkdir_p(destination) reader = ::Archive::Reader.open_filename(@archive) reader.each_entry do |entry| if entry.pathname =~ ignore_re Mixlib::Archive::Log.warn "ignoring entry #{entry.pathname}" next end reader.extract(entry, flags.to_i, destination: destination) end reader.close end