How to use fs2 - 4 common examples

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));
    }
github medikoo / modules-webmake / lib / parser.js View on Github external
const getMain = memoize(path =>
	readFile(resolve(path, "package.json"), readFileOpts)(content => {
		const { main } = parse(stripBOM(content));
		if (!main) throw new Error("No main setting found");
		return main;
	})
);
github medikoo / modules-webmake / lib / parser.js View on Github external
const readFileData = function (filename, fileParser, localFilename) {
	return readFile(filename, readFileOpts)(code =>
		readFileContent(code, filename, fileParser, localFilename)
	);
};
github jbalsas / apify / lib / utils / Workspace.js View on Github external
deferred.map(fileset.groups, function (group) {
            return fs2.mkdir(path.join(folder, group.path), {intermediate: true});
        }).then(function () {
            def.resolve(fileset);

fs2

fs (file system package) extensions

ISC
Latest version published 3 years ago

Package Health Score

62 / 100
Full package analysis