Module 18: File Operations
Check your understanding
A quick multiple-choice check before you move on. Answer every question, then submit to see how you did.
1.In Rust's std::path module, what is the relationship between Path and PathBuf, analogous to another well-known pair in the language?
2.What does std::fs::read_to_string("config.toml") return?
3.You want to add a line to the end of an existing log.txt without erasing its contents. Which approach does the theory describe?
4.What is the difference between fs::create_dir("a/b/c") and fs::create_dir_all("a/b/c")?
5.The theory maps PathBuf::from("dir").join("file.txt") to which C# API?
Answer every question to submit.