Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Support for .zip archives with unknown extensions at runtime #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jogleasonjr
Copy link

This allows for the listing of .zip archives with changed extensions, such as .docx, .pptx, .xlsx, .idml, and many others. An options.forceZip flag on the list() method enables this.

@edbrannin
Copy link

Issue: this only helps with list(), but I'm trying to use readFile() (which doesn't have an options parameter) on an .ipa (zip) -- I think it would be cleaner and more consistent if one of the following happened:

  1. Expose a function that can add to the list of zip-like files
  2. Expose readFileFrom* and list*()
  3. EDIT to add: Check for zipness with something Magic-based

@jogleasonjr
Copy link
Author

Expose a function that can add to the list of zip-like files

I did just that in my latest commit -- exposed an instance level function:

archive.configureExtensions(zip: ['.customZip'])

This way, one can add custom extensions for any of the archive types. It works with both list() and readFile(). There's a test for each.

My objective is to propagate this configurability forward into Atom's archive-view, so I can peek inside archives that have atypical extensions.

@edbrannin
Copy link

Works for me! (though I'm not a committer, just someone else with this need)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants