6 function checkPathExt (path, options) {
7 var pathext = options.pathExt !== undefined ?
8 options.pathExt : process.env.PATHEXT
14 pathext = pathext.split(';')
15 if (pathext.indexOf('') !== -1) {
18 for (var i = 0; i < pathext.length; i++) {
19 var p = pathext[i].toLowerCase()
20 if (p && path.substr(-p.length).toLowerCase() === p) {
27 function isexe (path, options, cb) {
28 fs.stat(path, function (er, st) {
29 cb(er, er ? false : checkPathExt(path, options))
33 function sync (path, options) {
35 return checkPathExt(path, options)