Open
Description
Location
https://doc.rust-lang.org/std/macro.file.html
Summary
When describing properties of paths, it's useful to specify whether the given path is absolute or relative. After reading the documentation of std::file
, which didn't mention whether it expands to absolute or relative path, I assumed (and rightly so!) that the path must be absolute. However, in my case it expanded to src/lib\nifti_image.rs
, to a relative path with alternating component separators. Based on that, I assume that std::file
expands to a path that is either
- relative to manifest, regardless of the platform.
- relative to manifest or absolute, depending on the platform.
Since it returns &str
instead of OsStr
, it would be weird if it would attempt to return absolute paths. However, this is not immediately obvious (to me).