Skip to main content

root

Function root 

Source
pub fn root() -> Result<PathLocation>
Available on macOS or iOS or watchOS or tvOS or visionOS or FreeBSD or OpenBSD or DragonFly BSD or NetBSD or Linux or Windows only.
Expand description

Returns the PathLocation of the system drive root.

On Unix this resolves /. On Windows this resolves the %SystemDrive% environment variable (falling back to C:\ if unset).