pub fn local_file_tree_nodes(
root_path: impl Into<PathBuf>,
expanded_paths: impl IntoIterator<Item = PathBuf>,
selected_path: Option<PathBuf>,
options: FileTreeOptions,
) -> Result<Vec<FileExplorerNode>, FileError>Expand description
Synchronously snapshots a native directory with provider-neutral policies.
Relative root paths use the process working directory; relative expanded and selected paths use the resolved root. Root, expansion ancestors, and selected ancestors are deduplicated before depth-first provider traversal.
§Errors
Returns [FileError] for native-path URI conversion, root metadata, directory
listing, or canonicalization failures. I/O runs synchronously on the caller.
§Examples
use std::path::PathBuf;
use ailloli_ui_fs::FileError;
use ailloli_ui_widgets::files::{local_file_tree_nodes, FileExplorerNode, FileTreeOptions};
fn snapshot(path: PathBuf) -> Result<Vec<FileExplorerNode>, FileError> {
local_file_tree_nodes(path, std::iter::empty(), None, FileTreeOptions::default())
}