Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Add "Cli style" relative path to a pathbuf
I'm doing a cli app using clap that require a path as an input. Except, this path can be both absolute and relative.
Having an absolute path is fine, and having an "extending" relative path (ex: "images/cats") is easy to deal with, but I cannot find anything to deal with paths that go to the parent directory (ex: "../images/cats").
Is there any sneaky method I can use? Or crate?
6 posts - 3 participants
🏷️ rust_feed