Collect only directories from the tree. Convenience function that collects only directories, not files. # Arguments `txn` - Transaction providing tree access `prefix` - Optional prefix filter # Returns A vector of directory TreeItems.
(
txn: &T,
prefix: &str,
)
| 893 | /// |
| 894 | /// A vector of directory TreeItems. |
| 895 | pub fn collect_directories<T: TreeTxnT + GraphTxnT>( |
| 896 | txn: &T, |
| 897 | prefix: &str, |
| 898 | ) -> Result<Vec<TreeItem>, PristineError> { |
| 899 | let options = TreeCollectOptions::new() |
| 900 | .prefix(prefix) |
| 901 | .collect_files(false); |
| 902 | |
| 903 | let result = collect_tree(txn, "", options)?; |
| 904 | Ok(result.items) |
| 905 | } |
| 906 | |
| 907 | /// Build a tree structure from flat paths. |
| 908 | /// |
nothing calls this directly
no test coverage detected