1 | /**
|
2 | Check if a path exists.
|
3 |
|
4 | @returns Whether the path exists.
|
5 |
|
6 | @example
|
7 | ```
|
8 | // foo.ts
|
9 | import {pathExists} from 'path-exists';
|
10 |
|
11 | console.log(await pathExists('foo.ts'));
|
12 | //=> true
|
13 | ```
|
14 | */
|
15 | export function pathExists(path: string): Promise<boolean>;
|
16 |
|
17 | /**
|
18 | Synchronously check if a path exists.
|
19 |
|
20 | @returns Whether the path exists.
|
21 |
|
22 | @example
|
23 | ```
|
24 | // foo.ts
|
25 | import {pathExistsSync} from 'path-exists';
|
26 |
|
27 | console.log(pathExistsSync('foo.ts'));
|
28 | //=> true
|
29 | ```
|
30 | */
|
31 | export function pathExistsSync(path: string): boolean;
|