Sample code for 30+ languages & platforms
Rust

Get the Target of a Symbolic Link

See more FileAccess Examples

Demonstrates how to get the target of a symbolic link.

Note: This example requires Chilkat v9.5.0.77 or greater.

Chilkat Rust Downloads

Rust
let fac = chilkat::FileAccess::new();

let Ok(target_path) = fac.symlink_target("qa_data/my_symlink") else {
    println!("Failed to get symlink target.");
    return;
};

println!("target path = {}", target_path);