Please help me to find an elegant way to get file path without extension; cut off file extension from path or something.
Check the Path::file_stem method. You can find an example there. It works at least from Rust 1.6.
Path::file_stem