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,
)
| 879 | /// |
| 880 | /// A vector of file TreeItems. |
| 881 | pub fn collect_files<T: TreeTxnT + GraphTxnT>( |
| 882 | txn: &T, |
| 883 | prefix: &str, |
| 884 | ) -> Result<Vec<TreeItem>, PristineError> { |
| 885 | let options = TreeCollectOptions::new() |
| 886 | .prefix(prefix) |
| 887 | .collect_directories(false); |
| 888 | |
| 889 | let result = collect_tree(txn, "", options)?; |
| 890 | Ok(result.items) |
| 891 | } |
| 892 | |
| 893 | /// Collect only directories from the tree. |
| 894 | /// |
nothing calls this directly
no test coverage detected