pub async fn tree_dir( path: &str, max_depth: Option<usize>, show_hidden: bool, ) -> Result<String, AppError>
Build a directory tree asynchronously.
Returns a JSON string containing the tree.