Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

add unarchiver example #425

Closed
wants to merge 3 commits into from
Closed

add unarchiver example #425

wants to merge 3 commits into from

Conversation

jm33-m0
Copy link

@jm33-m0 jm33-m0 commented Oct 24, 2024

Hi Matt, thanks for the great work!

I noticed there's no Unarchive function in v4 yet, and the documentation is incomplete and hard to follow, so I wrote a small program that invokes your extractor API to automatically identify the format and unarchive tarballs.

Please check the code and point out where I need to improve. It can serve as an example for users who seek a quick solution from this project.

@mholt
Copy link
Owner

mholt commented Nov 2, 2024

Thanks for this; I like the idea of posting an example instead of prescribing one way to do it in the code itself.

I have a few suggestions on how to tweak this but I will have to come back and write those up later.

I suppose this might resolve #311.

@mholt mholt linked an issue Nov 2, 2024 that may be closed by this pull request
@mholt
Copy link
Owner

mholt commented Nov 18, 2024

Does this example take into account #391?

@jm33-m0
Copy link
Author

jm33-m0 commented Nov 18, 2024

Does this example take into account #391?

In fact, my code doesn't retain the file/dir permissions. So I guess it will "solve" #391.

@mholt
Copy link
Owner

mholt commented Nov 18, 2024

Gotcha. This is a good start, but I think file mode bits (permissions, etc) are important, so we might need to include those in a proper example.

@jm33-m0
Copy link
Author

jm33-m0 commented Nov 19, 2024

I have updated the code with necessary changes to address the directory permission issue, and I also added code to handle symlinks.

@mholt
Copy link
Owner

mholt commented Nov 19, 2024

Thank you! However, I don't think we should be providing an actual program, just an example in the docs.

I'm actually about the archive this repository, but we can continue this discussion over in mholt/archives if you would like.

@mholt mholt closed this Nov 19, 2024
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.

Easier unarchiving support with v4?
2 participants