Function junction::get_target

source ·
pub fn get_target<P: AsRef<Path>>(junction: P) -> Result<PathBuf>
Expand description

Gets the target of the specified junction point.

N.B. Only works on NTFS.

Example

use std::io;
fn main() -> io::Result<()> {
    assert_eq!(get_target(r"C:\Users\Default User")?.to_str(), Some(r"C:\Users\Default"));
    Ok(())
}