mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-08 15:23:57 +00:00
8 lines
420 B
TypeScript
8 lines
420 B
TypeScript
/** SQLite main database plus every journal-mode sidecar that can contain database pages. */
|
|
export const SQLITE_DATABASE_FILE_SUFFIXES = ["", "-wal", "-shm", "-journal"] as const;
|
|
|
|
/** Resolves the main database and all possible journal-mode sidecar paths. */
|
|
export function resolveSqliteDatabaseFilePaths(pathname: string): string[] {
|
|
return SQLITE_DATABASE_FILE_SUFFIXES.map((suffix) => `${pathname}${suffix}`);
|
|
}
|