'>file_name</span>();
<span class='kw'>let</span> <span class='ident'>extension</span> <span class='op'>=</span> <span class='ident'>path</span>.<span class='ident'>extension</span>();
<span class='kw'>let</span> <span class='ident'>parent_dir</span> <span class='op'>=</span> <span class='ident'>path</span>.<span class='ident'>parent</span>();</pre>

<p>To build or modify paths, use <code>PathBuf</code>:</p>
<span class='rusttest'>fn main() {
    use std::path::PathBuf;
    
    let mut path = PathBuf::from