Documentation
¶
Overview ¶
Package winpath is useful for managing PATH as part of the Environment in the Windows HKey Local User registry. It returns an error for most operations on non-Windows systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrWrongPlatform = fmt.Errorf("method not implemented on this platform")
ErrWrongPlatform indicates that this was not built for Windows
Functions ¶
func Add ¶
Add will rewrite the Windows registry HKLU Environment, prepending the given directory path to the user's PATH. It will return whether the PATH was modified and an error if it should have been modified, but wasn't.
func IndexOf ¶
IndexOf searches the given path list for first occurence of the given path entry and returns the index, or -1
func NormalizePathEntry ¶
NormalizePathEntry will return the given directory path relative from its absolute path to the %USERPROFILE% (home) directory.
Types ¶
This section is empty.