I'm currently developing a Cordova app. I'm trying to unzip a zip file. I used the cordova-plugin-zip
to make this possible. However my zip file is mixed with folder and files. When I tried to unzip it, it only extract the files and the folders are ignore. How to make this possible? Thanks!
Here's some of my codes.
public static UnZipFile(filename: string, extractedpath: string) {
var promise = new Promise<string>((resolve, reject) => {
AppBridge.createDirectory(extractedpath); //This creates the directory path
var filePath: string = AppBridge.getZipName(filename); //Get the zip file name
var destination: string = AppBridge.outputDirectory(extractedpath); //Get the output directory
zip.unzip(filePath, destination);
});
}
The AppBridge
is written in C#, my project somehow mixed in .Net Core and Cordova. That's why the C# kind of limited of what can do. I just used it to get some information to Windows.