MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / isFileFresh

Method isFileFresh

src/codegraph/schema.ts:101–108  ·  view source on GitHub ↗

Returns true if the file's mtime+size+hash match our cached entry → can be skipped.

(path: string, mtimeMs: number, sizeBytes: number, contentHash: string | null)

Source from the content-addressed store, hash-verified

99
100 /** Returns true if the file's mtime+size+hash match our cached entry → can be skipped. */
101 isFileFresh(path: string, mtimeMs: number, sizeBytes: number, contentHash: string | null): boolean {
102 const row = this.findFileByPath.get(path) as FileRow | undefined;
103 if (!row) return false;
104 if (row.mtime_ms !== mtimeMs) return false;
105 if (row.size_bytes !== sizeBytes) return false;
106 if (contentHash && row.content_hash && row.content_hash !== contentHash) return false;
107 return true;
108 }
109
110 /** Replace all symbols for a file atomically. */
111 replaceFileSymbols(

Callers 1

indexAllMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected