You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
258 B
Rust
10 lines
258 B
Rust
3 years ago
|
use std::path::PathBuf;
|
||
|
fn main() {
|
||
|
let mut f_path = PathBuf::new();
|
||
|
f_path.push(r"/tmp");
|
||
|
f_path.push("packt");
|
||
|
f_path.push("rust");
|
||
|
f_path.push("book");
|
||
|
f_path.set_extension("rs");
|
||
|
println!("Path constructed is {:?}", f_path);
|
||
|
}
|