X000A_NTFS worked for 7zip! Thanks
2018-07-05 8:17 GMT-03:00 Luís Filipe Nassif <[email protected]>: > Thank you, Stefan. > > Luis > > 2018-07-05 6:25 GMT-03:00 Stefan Bodewig <[email protected]>: > >> On 2018-07-04, Luís Filipe Nassif wrote: >> >> > I am trying to create a zip file saving its entries accessTime and >> > CreationTime, but when I open the zip file with 7zip, those dates are >> not >> > shown, >> >> ... >> >> > entry.setLastAccessTime(FileTime.fromMillis(System.currentTi >> meMillis())); >> >> ... >> >> > Any idea why it does not work? >> >> Commons Compress' ZipArchiveEntry inherits this method from ZipEntry. It >> was added in Java8 and as Commons Compress currently targets Java7 we >> haven't added any support for the new fields, yet. >> >> Basically our code base doesn't know you have set the values at all. >> >> The way you set the dates using Commons Compress' API is by creating a >> X5455_ExtendedTimestamp extra field and attaching it to the >> ZipArchiveEntry. If you want to be extra sure you create an additional >> X000A_NTFS extra field. I'm not sure which of the two (maybe both?) >> Java8 would use or which one 7z would consult (InfoZIP only uses the >> ExtendedTimestamp IIRC). >> >> Stefan >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> >
