Method: Zip::ExtraField::NTFS#pack_for_c_dir
- Defined in:
- lib/zip/extra_field/ntfs.rb
#pack_for_c_dir ⇒ Object
But 7-zip for Windows only stores at central dir
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/zip/extra_field/ntfs.rb', line 49 def pack_for_c_dir # reserved 0 and tag 1 s = [0, 1].pack("Vv") tag1 = ''.force_encoding(Encoding::BINARY) if @mtime tag1 << [to_ntfs_time(@mtime)].pack('Q<') if @atime tag1 << [to_ntfs_time(@atime)].pack('Q<') if @ctime tag1 << [to_ntfs_time(@ctime)].pack('Q<') end end end s << [tag1.bytesize].pack('v') << tag1 s end |