call a callback once a file is created
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
LICENSE.txt
README.md
index.js
package.json

README.md

when-file-exists

Call a callback once a file is created.

var whenFileExists = require('when-file-exists')
var path = require('path')

var pathToFile = path.resolve(__dirname, 'some-file.txt')

whenFileExists(pathToFile, function (err) {
  if (err) { throw err }

  // some-file.txt exists
})