Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created March 20, 2016 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/3c9844102f359b982869 to your computer and use it in GitHub Desktop.
Save chuck0523/3c9844102f359b982869 to your computer and use it in GitHub Desktop.
var fs = require('fs')
var glob = require('glob')
var rimraf = require('rimraf')
fs.mkdirSync('foo')
fs.mkdirSync('foo/bar', 0)
var g = new glob.Glob('foo/**/bar', function(err) {
err.code === 'EACCES'
g.abort()
rimraf.sync('foo')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment