Skip to content

Reading file attributes (e.g. Date Modified) from zipped files #203

Answered by 101arrowz
rjthorne asked this question in Q&A
Discussion options

You must be logged in to vote

I did not implement support for reading metadata from zip archives because they are not consistently encoded across different platforms and are not typically used by most consumer software. That is unlikely to change for bundle size reasons.

If you're creating the ZIP files yourself, I'd make a "fake" directory (sort of like Archive Utility's __MACOSX) where each file inside contains some metadata you want to include (maybe some JSON like { "type": "application/octet-stream", "lastModified": 1707581482254 }, and then read those fake entries when you decompress.

If you absolutely need to read this metadata from ZIP files you aren't creating, I'd try something like zip.js instead, which has…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rjthorne
Comment options

Answer selected by rjthorne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants