Function system_prefix

Source
pub fn system_prefix() -> Option<&'static Path>
Expand description

Returns the platform dependent system prefix or None if it cannot be found (right now only on Windows).

§Performance

On Windows, the slowest part is the launch of the Git executable in the PATH. This is often avoided by inspecting the environment, when launched from inside a Git Bash MSYS2 shell.

§When None is returned

This happens only Windows if the git binary can’t be found at all for obtaining its executable path, or if the git binary wasn’t built with a well-known directory structure or environment.