extract_zipped_file#
- eoio.utils.read_utils.extract_zipped_file(path: str, path_extracted: str | None = None) None[source]#
Extracts data from zipped file indicated by path.
If the zip already wraps everything in one top-level folder matching path_extracted’s own name (see
_zip_self_wraps()), extracts relative to its parent directory – the zip’s own folder becomes path_extracted with no extra work. Otherwise (loose top-level files, a differently-named folder, …) creates path_extracted itself and extracts every member’s own relative path underneath it, so the result is always"<path_extracted>/<member's own path>"regardless of the zip’s internal packaging.- Parameters:
path – path to data
path_extracted – path to extracted data