* Get a file record by path
(filePath: string)
| 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 |
no test coverage detected