unzip function
UnZips the non-.zip file into a folder
Implementation
Future<void> unzip({
required File sourceFile,
required Directory outputDirectory,
///Overwrite the files and folders at the output directory if file/folder names exist.
bool overWrite = false,
})async{
String json = await sourceFile.readAsString();
Map<String, dynamic>? map;
try{
map = jsonDecode(json);
}catch(error){
throw ZipperError.errorParsing;
}
//Start the function that will extract the merged files
await _setFilesFromObject(
extractionDirectory: outputDirectory,
map: map!,
overWrite: overWrite,
);
}