Collect only files from the tree. Convenience function that collects only files, not directories. # Arguments `txn` - Transaction providing tree access `prefix` - Optional prefix filter # Returns A vector of file TreeItems.
(
txn: &T,
prefix: &str,
)
| 869 | /// |
| 870 | /// A vector of file TreeItems. |
| 871 | pub fn collect_files<T: TreeTxnT + GraphTxnT>( |
| 872 | txn: &T, |
| 873 | prefix: &str, |
| 874 | ) -> Result<Vec<TreeItem>, PristineError> { |
| 875 | let options = TreeCollectOptions::new() |
| 876 | .prefix(prefix) |
| 877 | .collect_directories(false); |
| 878 | |
| 879 | let result = collect_tree(txn, "", options)?; |
| 880 | Ok(result.items) |
| 881 | } |
| 882 | |
| 883 | /// Collect only directories from the tree. |
| 884 | /// |
nothing calls this directly
no test coverage detected