Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter by header/metadata #32

Closed
chpio opened this issue Feb 26, 2016 · 2 comments
Closed

filter by header/metadata #32

chpio opened this issue Feb 26, 2016 · 2 comments

Comments

@chpio
Copy link
Contributor

chpio commented Feb 26, 2016

is there a possibility to filter files by the metadata (called header)?

passing the header to the ignore func should do the job:

    if (ignore(name)) {
      stream.resume()
      return next()
    }

https://github.com/mafintosh/tar-fs/blob/master/index.js#L224-L227

    if (ignore(name, header)) {
      stream.resume()
      return next()
    }

but this is only the export side. but we need the import side also to generate and pass the header or just pass no header to the import ignore func but that would lead to an asymmetric api.

@mafintosh
Copy link
Owner

i'm fine with passing the header as the 2nd arg on extract only. wanna send a pr for that?

@mafintosh
Copy link
Owner

fixed in 1.11.0 by you :)

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

No branches or pull requests

2 participants