source: trip-planner-front/node_modules/path-type/index.d.ts@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.3 KB
Line 
1export type PathTypeFunction = (path: string) => Promise<boolean>;
2
3/**
4 * Check whether the passed `path` is a file.
5 *
6 * @param path - The path to check.
7 * @returns Whether the `path` is a file.
8 */
9export const isFile: PathTypeFunction;
10
11/**
12 * Check whether the passed `path` is a directory.
13 *
14 * @param path - The path to check.
15 * @returns Whether the `path` is a directory.
16 */
17export const isDirectory: PathTypeFunction;
18
19/**
20 * Check whether the passed `path` is a symlink.
21 *
22 * @param path - The path to check.
23 * @returns Whether the `path` is a symlink.
24 */
25export const isSymlink: PathTypeFunction;
26
27export type PathTypeSyncFunction = (path: string) => boolean;
28
29/**
30 * Synchronously check whether the passed `path` is a file.
31 *
32 * @param path - The path to check.
33 * @returns Whether the `path` is a file.
34 */
35export const isFileSync: PathTypeSyncFunction;
36
37/**
38 * Synchronously check whether the passed `path` is a directory.
39 *
40 * @param path - The path to check.
41 * @returns Whether the `path` is a directory.
42 */
43export const isDirectorySync: PathTypeSyncFunction;
44
45/**
46 * Synchronously check whether the passed `path` is a symlink.
47 *
48 * @param path - The path to check.
49 * @returns Whether the `path` is a directory.
50 */
51export const isSymlinkSync: PathTypeSyncFunction;
Note: See TracBrowser for help on using the repository browser.