fast-rmrf
v1.0.1
Published
A library for doing rm -rf, but fast.
Downloads
1
Readme
fast-rmrf
A library for doing rm -rf, but fast.
Usage
import rmrf from 'fast-rmrf';
rmrf('directory/');
rmrf('directory', {
tmpDir: require('os').tmpdir(), // optional
fork: true, // if set to false, this won't be any faster than regular rm -rf
});
How it works
Rather than synchronously waiting for all files to be deleted, this library creates a temporary directory, moves the target directory into the temporary directory, and then forks a process to delete the temporary directory in the background.