(path: string | URL)
| 12 | const isBun = navigator.userAgent.includes("Bun/"); |
| 13 | |
| 14 | async function checkExists(path: string | URL) { |
| 15 | try { |
| 16 | const stated = await stat(path); |
| 17 | return stated.isDirectory; |
| 18 | } catch (e) { |
| 19 | if (e instanceof NotFound) { |
| 20 | return false; |
| 21 | } |
| 22 | throw e; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | function checkExistsSync(path: string | URL) { |
| 27 | try { |
no test coverage detected