(path: PathLike)
| 25 | import { Path, PathFragment, dirname, fragment, getSystemPath, normalize, virtualFs } from '../src'; |
| 26 | |
| 27 | async function exists(path: PathLike): Promise<boolean> { |
| 28 | try { |
| 29 | await fsPromises.access(path, constants.F_OK); |
| 30 | |
| 31 | return true; |
| 32 | } catch { |
| 33 | return false; |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | // This will only be initialized if the watch() method is called. |
| 38 | // Otherwise chokidar appears only in type positions, and shouldn't be referenced |