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

Version Path
listen360-rubyXL-1.2.10.2 lib/rubyXL/zip.rb
listen360-rubyXL-1.2.10.1 lib/rubyXL/zip.rb
thunderboltlabs-rubyXL-1.2.10.2 lib/rubyXL/zip.rb
thunderboltlabs-rubyXL-1.2.10.1 lib/rubyXL/zip.rb
rubyXL-1.2.10 lib/rubyXL/zip.rb
rubyXL-1.2.9 lib/rubyXL/zip.rb
rubyXL-1.2.8 lib/rubyXL/zip.rb
rubyXL-1.2.7 lib/rubyXL/zip.rb
rubyXL-1.2.6 lib/rubyXL/zip.rb
rubyXL-1.2.5 lib/rubyXL/zip.rb
rubyXL-1.2.4 lib/rubyXL/zip.rb
rubyXL-1.2.3 lib/rubyXL/zip.rb
rubyXL-1.2.2 lib/rubyXL/zip.rb
rubyXL-1.2.1 lib/rubyXL/zip.rb
rubyXL-1.2.0 lib/rubyXL/zip.rb
rubyXL-1.1.12 lib/rubyXL/zip.rb
rubyXL-1.1.11 lib/rubyXL/zip.rb
rubyXL-1.1.10 lib/rubyXL/zip.rb
rubyXL-1.1.9 lib/rubyXL/zip.rb
rubyXL-1.1.8 lib/rubyXL/zip.rb