touchp
v0.1.1
Published
mkdir -p meets touch
Downloads
84
Readme
touchp
Like mkdir -p
, but with touch
Install
npm install touchp
Usage
var touchp = require('touchp');
touchp('some/path/that/may/not/exist.txt', function(err, alreadyExisted) {
console.log("File " + (alreadyExisted ? 'already exists' : 'was created'));
});
var existedBefore = touchp.sync('some/other/path/that/may/not/exist.txt')