PHP 8.2.30
Preview: windows.js Size: 735 B
/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/windows.js

module.exports = isexe
isexe.sync = sync

var fs = require('fs')

function checkPathExt (path, options) {
  var pathext = options.pathExt !== undefined ?
    options.pathExt : process.env.PATHEXT

  if (!pathext) {
    return true
  }

  pathext = pathext.split(';')
  if (pathext.indexOf('') !== -1) {
    return true
  }
  for (var i = 0; i < pathext.length; i++) {
    var p = pathext[i].toLowerCase()
    if (p && path.substr(-p.length).toLowerCase() === p) {
      return true
    }
  }
  return false
}

function isexe (path, options, cb) {
  fs.stat(path, function (er, st) {
    cb(er, er ? false : checkPathExt(path, options))
  })
}

function sync (path, options) {
  fs.statSync(path)
  return checkPathExt(path, options)
}

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
23 B lrw-r--r-- 2021-09-28 09:36:07
Edit Download
237 B lrw-r--r-- 2021-09-28 09:36:07
Edit Download
1.24 KB lrw-r--r-- 2021-09-28 09:36:07
Edit Download
765 B lrw-r--r-- 2021-09-28 09:36:07
Edit Download
814 B lrw-r--r-- 2021-09-28 09:36:07
Edit Download
2.05 KB lrw-r--r-- 2021-09-28 09:36:07
Edit Download
1.44 KB lrw-r--r-- 2021-09-28 09:36:07
Edit Download
735 B lrw-r--r-- 2021-09-28 09:36:07
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).