Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def unzip_file (file_path, destination_path)
- begin
- Zip::ZipFile.open(file_path) { |zip_file|
- zip_file.each { |f|
- f_path=File.join(destination_path, f.name)
- FileUtils.mkdir_p(File.dirname(f_path))
- zip_file.extract(f, f_path) unless File.exist?(f_path)
- }
- }
- rescue => e
- $LOG.error "Error occurred in Utils.unzip_file - #{e}"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement