Is Path::new(many-subdirs) good enough for both Linux and Windows?

Viewed 82

I have no Windows machine right now, but I want to make my code cross-platform. I have working code from build.rs that works on Linux:

Path::new("dir1/dir2/dir3")

Is this correct for Windows or should I use something like:

Path::new("dir1").join("dir2").join("dir3")
2 Answers
Related