path separator
The character between folder names in a path: / on macOS and Linux, \ on Windows.
Path components are separated by / on Unix and \ (or /) on Windows; Path and PathBuf handle the difference, and std::path::MAIN_SEPARATOR is the platform's preferred one.
Examples
Path::new("data").join("readings.txt")givesdata/readings.txton Linux and macOS anddata\readings.txton Windows.
See also