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

Feature request: ability to extract single file #71

Open
emmercm opened this issue Feb 3, 2023 · 1 comment
Open

Feature request: ability to extract single file #71

emmercm opened this issue Feb 3, 2023 · 1 comment

Comments

@emmercm
Copy link

emmercm commented Feb 3, 2023

I would love an option to extract a single file:

_7z.unpackSingle('some_file.7z', 'file_in_7z.txt', '/home', (err) => {
  // /home/file_in_7z.txt exists
});

I think something like this should be possible with:

7za x some_file.7z -y file_in_7z.txt

Really what I want is the ability to also specify its final location, including filename, but I don't think 7za supports something like this:

_7z.unpackSingle('some_file.7z', 'file_in_7z.txt', '/home/some_other_filename.txt', (err) => {
  // /home/some_other_filename.txt exists
});
@onikienko
Copy link
Owner

Initially, I designed this package as a minimal 7z wrapper. Even the name tells - 7zip-min (minimal). Just pack and unpack 7z archives to avoid unreadable strings like 'a', 'path/to/archive.7z', 'path/to/dir/or/file'. With the ability to deal with 7z via cmd if it is required.
Later @aqblanco contributed the list method...
But I still want to keep the package minimal. So not sure about unpackSingle but I will investigate.

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