MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isReplacedOnDisk

Method isReplacedOnDisk

src/db/index.ts:760–764  ·  view source on GitHub ↗

* True when the DB file at our path has been REPLACED on disk since we opened * it — a different inode now lives at the same path, so the fd we still hold * points at a now-unlinked inode that can never receive new writes (#925). * The trigger is removing and recreating `.codegraph/` at the

()

Source from the content-addressed store, hash-verified

758 * unlink an open file and its st_ino is unreliable, so this never fires there).
759 */
760 isReplacedOnDisk(): boolean {
761 if (this.openedInode === null) return false;
762 const current = statInode(this.dbPath);
763 return current !== null && current !== this.openedInode;
764 }
765}
766
767/**

Callers 2

reopenIfReplacedMethod · 0.80

Calls 1

statInodeFunction · 0.85

Tested by

no test coverage detected