diff --git a/packages/shell/src/utils/fs.ts b/packages/shell/src/utils/fs.ts new file mode 100644 index 0000000..5fa1cad --- /dev/null +++ b/packages/shell/src/utils/fs.ts @@ -0,0 +1,10 @@ +import { access } from 'node:fs/promises' + +export async function exists(path: string): Promise { + try { + await access(path) + } catch (_) { + return false + } + return true +}