* Get a file record by path
(filePath: string)
| 4689 | * Get a file record by path |
| 4690 | */ |
| 4691 | getFileByPath(filePath: string): FileRecord | null { |
| 4692 | if (!this.stmts.getFileByPath) { |
| 4693 | this.stmts.getFileByPath = this.db.prepare('SELECT * FROM files WHERE path = ?'); |
| 4694 | } |
| 4695 | const row = this.stmts.getFileByPath.get(filePath) as FileRow | undefined; |
| 4696 | return row ? rowToFileRecord(row) : null; |
| 4697 | } |
| 4698 | |
| 4699 | /** |
| 4700 | * Whether any tracked file lives under the project-relative POSIX directory |
no test coverage detected