How to use the adm-zip/util/index.js.makeDir function in adm-zip

To help you get started, we’ve selected a few adm-zip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imlucas / lone / embed / admzip.js View on Github external
_zip.entries.forEach(function(entry) {
                        if (entry.isDirectory) {
                            Utils.makeDir(pth.resolve(targetPath, entry.entryName.toString()));
                            return;
                        }
                        var content = entry.getData();
                        if (!content) {
                            throw Utils.Errors.CANT_EXTRACT_FILE + "2";
                        }
                        Utils.writeFileTo(pth.resolve(targetPath, entry.entryName.toString()), content, overwrite);
                    });
                },