How to use the adm-zip/util/errors.js.FILE_IN_THE_WAY 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
path.split(PATH_SEPARATOR).forEach(function(name) {
                    if (!name || name.substr(-1, 1) == ":") return;
                    resolvedPath += PATH_SEPARATOR + name;
                    var stat;
                    try {
                        stat = fs.statSync(resolvedPath);
                    } catch (e) {
                        fs.mkdirSync(resolvedPath);
                    }
                    if (stat && stat.isFile()) throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath);
                });
            }