Skip to main content

Module path

Module path 

Source
Expand description

Path utilities

Provides path canonicalization and validation helpers for file/directory pickers.

§Example

use ccf_gpui_widgets::utils::path::{parse_path, expand_tilde};

// Parse and canonicalize a path
let info = parse_path("~/Documents/output.txt");
if info.fully_exists() {
    println!("File exists at: {}", info.full_path_string());
} else {
    println!("Existing portion: {:?}", info.existing_canonical);
    println!("Non-existing suffix: {:?}", info.non_existing_suffix);
}

Structs§

PathInfo
Result of parsing and canonicalizing a user-provided path

Functions§

expand_tilde
Expand tilde (~) to home directory
parse_path
Parse and canonicalize a user-provided path (which may be relative or non-canonical)