* Checks if a path exists. * @param {string} path The path to check * @returns {Promise }
(path)
| 355 | * @returns {Promise<boolean>} |
| 356 | */ |
| 357 | async exists(path) { |
| 358 | try { |
| 359 | await this.stat(path); |
| 360 | return true; |
| 361 | } catch { |
| 362 | return false; |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | /** |
| 367 | * Checks if a path exists synchronously. |