class RubyXL::MyZip
Public Instance Methods
unzip(zipPath,zipDirPath)
click to toggle source
Unzips .zip file at zipPath to zipDirPath
# File lib/rubyXL/zip.rb, line 9 def unzip(zipPath,zipDirPath) Zip::ZipFile.open(zipPath) { |zip_file| zip_file.each { |f| fpath = File.join(zipDirPath, f.name) FileUtils.mkdir_p(File.dirname(fpath)) zip_file.extract(f, fpath) unless File.exist?(fpath) } } end