Rust PathBuf Examples

These are examples of the functions and features available in Rusts PathBuf

Pop

NOTE: the pop just returns true not the item that was popped as far as I can tell

Set Extension

Set File Name

Ancestors

Canonicalize

Components

Display Name

Extension

File Name

File Stem

(There's a `file_prefix`` that's in nightly as well that will do a similar thing as thise but return `alfa`` instead)

Join Paths

This creates a new path from the joined parts

Metadata

Parent

Strip Prefix

A basic rundown of Rust path features