srikanth-lingala / zip4j

A Java library for zip files and streams
Apache License 2.0
2.09k stars 313 forks source link

Enable access to file permissions, creation time and last access time for encrypted zip files #557

Open dan-s1 opened 3 months ago

dan-s1 commented 3 months ago

Apache commons-compress allow access to the file permissions, create time and the last access time for unencrypted zip files as seen in their Javadocs for methods [getUnixMode](https://javadoc.io/static/org.apache.commons/commons-compress/1.26.2/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html#getUnixMode()), getCreationTime and method getLastAccessTime. If it is possible to obtain these for encrypted zip files in zip4j, can you please create getXXX methods to retrieve them? Specifically in the src/main/java/net/lingala/zip4j/model/LocalFileHeader.java class. I have seen in #231 how you added the ability to capture the file permissions when writing a zip. If they are preserved in the zip file couldn't they be retrieved when reading a zip file? This may or may not be related to issue #460 in regards to file permissions. Thank you!