1.0.2 • Published 7 years ago
p-dir v1.0.2
p-dir
Promise based rmdir
and mkdir
that act like rm -rf
and mkdir -p
.
This assumes ES6
const dir = require('p-dir');
dir.rmdir('/').then(()=>console.log('you have now deleted your entire system'));
dir.mkdir('/home/pipobscure/a/path/to/a/new/directory').then(()=>console.log('it\'s there now'));