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

Method getFileByPath

src/db/queries.ts:4252–4258  ·  view source on GitHub ↗

* Get a file record by path

(filePath: string)

Source from the content-addressed store, hash-verified

4250 * Get a file record by path
4251 */
4252 getFileByPath(filePath: string): FileRecord | null {
4253 if (!this.stmts.getFileByPath) {
4254 this.stmts.getFileByPath = this.db.prepare('SELECT * FROM files WHERE path = ?');
4255 }
4256 const row = this.stmts.getFileByPath.get(filePath) as FileRow | undefined;
4257 return row ? rowToFileRecord(row) : null;
4258 }
4259
4260 /**
4261 * Whether any tracked file lives under the project-relative POSIX directory

Callers 10

syncMethod · 0.80
getFileMethod · 0.80
indexFilesMethod · 0.80
storeExtractionResultMethod · 0.80
syncMethod · 0.80
getChangedFilesMethod · 0.80
changedDefaultExportsMethod · 0.80
isIndexedFileMethod · 0.80
security.test.tsFile · 0.80

Calls 3

rowToFileRecordFunction · 0.85
prepareMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected