stachenov / quazip

Qt/C++ wrapper over minizip
Other
582 stars 232 forks source link

[Q] How do I extract a specific directory from inside a zip? #142

Closed txtsd closed 2 years ago

txtsd commented 2 years ago

I'm trying to extract a specific directory from inside a zip file, but I'm not able to find an easy way to do it.

stachenov commented 2 years ago

I don't see an easy way either. Seems that the JlCompress contributor didn't cover that case. Maybe get a list of files with JlCompress::getFileList() and then filter it, leaving only the paths starting with the needed directory, and then pass that filtered list into JlCompress::extractFiles().

txtsd commented 2 years ago

That's what I ended up doing. Thank you!