Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.216.250
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nodejs /
locate-path /
Delete
Unzip
Name
Size
Permission
Date
Action
index.d.ts
1.65
KB
-rw-r--r--
2022-12-08 00:13
index.js
1.41
KB
-rw-r--r--
2022-12-08 00:13
package.json
860
B
-rw-r--r--
2022-12-08 00:13
Save
Rename
import process from 'node:process'; import path from 'node:path'; import fs, {promises as fsPromises} from 'node:fs'; import {fileURLToPath} from 'node:url'; import pLocate from 'p-locate'; const typeMappings = { directory: 'isDirectory', file: 'isFile', }; function checkType(type) { if (Object.hasOwnProperty.call(typeMappings, type)) { return; } throw new Error(`Invalid type specified: ${type}`); } const matchType = (type, stat) => stat[typeMappings[type]](); const toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath; export async function locatePath( paths, { cwd = process.cwd(), type = 'file', allowSymlinks = true, concurrency, preserveOrder, } = {}, ) { checkType(type); cwd = toPath(cwd); const statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat; return pLocate(paths, async path_ => { try { const stat = await statFunction(path.resolve(cwd, path_)); return matchType(type, stat); } catch { return false; } }, {concurrency, preserveOrder}); } export function locatePathSync( paths, { cwd = process.cwd(), type = 'file', allowSymlinks = true, } = {}, ) { checkType(type); cwd = toPath(cwd); const statFunction = allowSymlinks ? fs.statSync : fs.lstatSync; for (const path_ of paths) { try { const stat = statFunction(path.resolve(cwd, path_)); if (matchType(type, stat)) { return path_; } } catch {} } }