PHP 8.2.30
Preview: windows.js Size: 890 B
/lib/node_modules/npm/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 checkStat (stat, path, options) {
  if (!stat.isSymbolicLink() && !stat.isFile()) {
    return false
  }
  return checkPathExt(path, options)
}

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

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

Directory Contents

Dirs: 0 × Files: 7

Name Size Perms Modified Actions
23 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.16 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
765 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
909 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.50 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.36 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
890 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download

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