(file: string)
| 6 | * Returns the file stats if it exists, or `false` if it doesn't. |
| 7 | */ |
| 8 | export async function exists(file: string): Promise<Stats | false> { |
| 9 | try { |
| 10 | return await stat(file); |
| 11 | } catch (err: any) { |
| 12 | if (err.code === 'ENOENT') { |
| 13 | return false; |
| 14 | } |
| 15 | throw err; |
| 16 | } |
| 17 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…