Retrieve all lines for a file by path with options. Like `get_file_lines` but allows controlling which content is included.
(
txn: &mut T,
path: &str,
options: &RetrievalOptions,
)
| 314 | /// |
| 315 | /// Like `get_file_lines` but allows controlling which content is included. |
| 316 | pub fn get_file_lines_with_options<T: MutTxnT>( |
| 317 | txn: &mut T, |
| 318 | path: &str, |
| 319 | options: &RetrievalOptions, |
| 320 | ) -> PristineResult<Vec<Line>> { |
| 321 | // Look up trunk by path |
| 322 | let trunk_id = match txn.get_trunk_by_path(path)? { |
| 323 | Some(id) => id, |
| 324 | None => return Ok(Vec::new()), // File not found |
| 325 | }; |
| 326 | |
| 327 | get_file_lines_by_trunk(txn, trunk_id, options) |
| 328 | } |
| 329 | |
| 330 | /// Retrieve all lines for a file by trunk ID. |
| 331 | pub fn get_file_lines_by_trunk<T: MutTxnT>( |
no test coverage detected