touchp

mkdir -p meets touch

  • touchp

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
touchp
0.1.19 years ago9 years agoMinified + gzip package size for touchp in KB

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')