- extract_file(file_path: Union[str, CloudPath, Path], output: Union[str, CloudPath, Path], overwrite: bool = False) Union[list, CloudPath, Path] [source]#
Extract an archived file (zip or others). Overwrites if specified. For zipfiles, in case of multiple folders archived, pay attention that what is returned is the first folder.
>>> file_path = 'D:/path/to/zip.zip' >>> output = 'D:/path/to/output' >>> extract_file(file_path, output, overwrite=True) D:/path/to/output.zip'