I am doing Python challenge in Ruby. I need to read the file contents and comments from a Zip file. The content is no problem with the RubyZip gem but I am unable to get the comments out. Any ideas?
According to the documentation an instance of the RubyZip ZipFile class has a comment
attribute which returns the zip file's comment, if it has one.
e.g.
require 'zip/zip'
Zip::ZipFile.open('zip_with_comment.zip') do |zipfile|
puts zipfile.comment
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With