diff options
Diffstat (limited to 'node_modules/isexe/access.js')
-rw-r--r-- | node_modules/isexe/access.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/isexe/access.js b/node_modules/isexe/access.js new file mode 100644 index 000000000..e67b28bd6 --- /dev/null +++ b/node_modules/isexe/access.js @@ -0,0 +1,15 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, _, cb) { + fs.access(path, fs.X_OK, function (er) { + cb(er, !er) + }) +} + +function sync (path, _) { + fs.accessSync(path, fs.X_OK) + return true +} |