How to use the fs2.rmdir function in fs2

To help you get started, we’ve selected a few fs2 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 jbalsas / apify / lib / utils / Workspace.js View on Github external
function _clearOutputFolder(folder) {
        return fs2.rmdir(folder, { recursive: true, force: true }).then(null, function (e) {
            // Ignore "No such dir" error, otherwise propagate further
            if (e.code === 'ENOENT') {
                return null;
            }
            throw e;
        }).then(fs2.mkdir.bind(fs2, folder));
    }

fs2

fs (file system package) extensions

ISC
Latest version published 4 years ago

Package Health Score

62 / 100
Full package analysis