Sha256: 54ee421fb869f308017ec780181e208ea57dfbf048dadb8f8fa6c0b7c4ada1a5
Contents?: true
Size: 448 Bytes
Versions: 36
Compression:
Stored size: 448 Bytes
Contents
require 'rubygems' require 'zip/zip' require 'zip/zipfilesystem' module RubyXL class MyZip # Unzips .zip file at zipPath to zipDirPath 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 end end
Version data entries
36 entries across 36 versions & 3 rubygems