One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
npm
/
node_modules
/
libnpmexec
/
lib
/
View File Name :
file-exists.js
const { resolve } = require('path') const { promisify } = require('util') const stat = promisify(require('fs').stat) const walkUp = require('walk-up-path') const fileExists = (file) => stat(file) .then((stat) => stat.isFile()) .catch(() => false) const localFileExists = async (dir, binName, root = '/') => { root = resolve(root).toLowerCase() for (const path of walkUp(resolve(dir))) { const binDir = resolve(path, 'node_modules', '.bin') if (await fileExists(resolve(binDir, binName))) { return binDir } if (path.toLowerCase() === root) { return false } } return false } module.exports = { fileExists, localFileExists, }