MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / checkFileExists

Function checkFileExists

packages/db/code-migrations/2-accounts.ts:25–32  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

23};
24
25async function checkFileExists(filePath: string): Promise<boolean> {
26 try {
27 await fs.access(filePath);
28 return true; // File exists
29 } catch (error) {
30 return false; // File does not exist
31 }
32}
33
34export async function up() {
35 const accountCount = await db.account.count();

Callers 1

upFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected