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

Pause, resume and cancel extraction #114

Open
Luury opened this issue Feb 18, 2022 · 1 comment
Open

Pause, resume and cancel extraction #114

Luury opened this issue Feb 18, 2022 · 1 comment

Comments

@Luury
Copy link

Luury commented Feb 18, 2022

Any way to pause and resume extraction? through a function or child_process "signal"...

const myStream = Seven.extractFull('./archive.7z', './output/dir/', {
  $progress: true
})

myStream.pause();

myStream.resume();

myStream.stop(); 

Could be an improvement...

@richies-dev
Copy link

I don't have a good answer for this but it's probably possible if you extract each file in the archive by name one at a time, and then for every file extracted save some flag like is_extracted or something. Then on pause stop extraction and on resume start extracting any files listed that do not have the flag is_extracted set.

Probably not the most performant method, and you would need a list of files/paths of everything in the archive, but it should work and is at least worth mentioning.

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