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

Method deleteFile

src/db/queries.ts:2148–2156  ·  view source on GitHub ↗

* Delete a file record and its nodes

(filePath: string)

Source from the content-addressed store, hash-verified

2146 * Delete a file record and its nodes
2147 */
2148 deleteFile(filePath: string): void {
2149 this.db.transaction(() => {
2150 this.deleteNodesByFile(filePath);
2151 if (!this.stmts.deleteFile) {
2152 this.stmts.deleteFile = this.db.prepare('DELETE FROM files WHERE path = ?');
2153 }
2154 this.stmts.deleteFile.run(filePath);
2155 })();
2156 }
2157
2158 /**
2159 * Get a file record by path

Callers 3

healZeroNodeRowsMethod · 0.80
storeExtractionResultMethod · 0.80
syncMethod · 0.80

Calls 4

deleteNodesByFileMethod · 0.95
transactionMethod · 0.65
prepareMethod · 0.65
runMethod · 0.65

Tested by

no test coverage detected