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)
| 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( |