std.zip: Add strip_components
to extract options
#20257
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
standard library
This issue involves writing Zig code for the standard library.
Milestone
std.tar.pipeToFileSystem()
has it butstd.zip.extract()
does not, so would be nice ifstd.zip
implemented something like that.strip_components
is usually set to 0 (by default) or 1, if the option is set to 1 it won't extract the root folder but rather the contents in the folder.Out of context: Currently in my own project I have to extract the zip in a temporary folder, get the root folder, move/rename the root folder to the appropriate destination and then remove the temporary directory. Don't judge me for that. I'm just saying what I am doing currently.
The text was updated successfully, but these errors were encountered: