// Get an absolute path without resolving symlinks or touching the fs.
Get an absolute path without resolving symlinks or touching the fs.
Get an absolute path without resolving symlinks or touching the fs .
pub fn absolute_path<P>(path: P) -> std::io::Result<PathBuf>
where
    P: AsRef<Path>,
{
    let path = path.as_ref();
    let absolute_path = if path.is_absolute() {
        path.to_path_buf()
    } else {
        std::env::current_dir()?.join(path)
    }
    .clean();
    Ok(absolute_path)
}
pub fn absolute_path < P > ( path : P ) -> std :: io :: Result < PathBuf > where P : AsRef < Path > , { let path = path . as_ref ( ) ; let absolute_path = if path . is_absolute ( ) { path . to_path_buf ( ) } else { std :: env :: current_dir ( ) ? . join ( path ) } . clean ( ) ; Ok ( absolute_path ) }
Get an absolute path without resolving symlinks or touching the fs.
Get an absolute path without resolving symlinks or touching the fs .
path
P