Skip to main content

PathExt

Trait PathExt 

Source
pub trait PathExt {
    // Required method
    fn with_all_extensions(&self, new_ext: &str) -> PathBuf;
}

Required Methods§

Source

fn with_all_extensions(&self, new_ext: &str) -> PathBuf

Return a new PathBuf with all existing extensions removed and replaced with new_ext.

ex: “foo.tar.gz” with new_ext="zip" becomes “foo.zip”

Implementations on Foreign Types§

Source§

impl PathExt for Path

Source§

fn with_all_extensions(&self, new_ext: &str) -> PathBuf

Implementors§