1.0.1 • Published 5 years ago

fast-rmrf v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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.