* Get a file record by path
(filePath: string)
| 1907 | * Get a file record by path |
| 1908 | */ |
| 1909 | getFileByPath(filePath: string): FileRecord | null { |
| 1910 | if (!this.stmts.getFileByPath) { |
| 1911 | this.stmts.getFileByPath = this.db.prepare('SELECT * FROM files WHERE path = ?'); |
| 1912 | } |
| 1913 | const row = this.stmts.getFileByPath.get(filePath) as FileRow | undefined; |
| 1914 | return row ? rowToFileRecord(row) : null; |
| 1915 | } |
| 1916 | |
| 1917 | /** |
| 1918 | * Get all tracked files |
no test coverage detected