Files
openclaw/src/media-understanding/fs.ts
2026-02-15 17:33:08 +00:00

14 lines
246 B
TypeScript

import fs from "node:fs/promises";
export async function fileExists(filePath?: string | null): Promise<boolean> {
if (!filePath) {
return false;
}
try {
await fs.stat(filePath);
return true;
} catch {
return false;
}
}