Trait PathExt

Source
pub trait PathExt {
    // Required method
    fn extensions_lossy(&self) -> ExtensionsLossy ;
}
Expand description

Path and PathBuf extensions.

Required Methods§

Source

fn extensions_lossy(&self) -> ExtensionsLossy

Returns an iterator over the extensions of a path, lossily converted.

use std::path::Path;
use path_utils::PathExt;

let path = Path::new("file.tar.gz");
let extensions = path.extensions_lossy().collect::<Vec<String>>();
assert_eq!(extensions, ["gz", "tar"]);

Implementors§

Source§

impl<T> PathExt for T
where T: AsRef<Path>,