Documentation
¶
Index ¶
- func Arch() string
- func CreateJunctions(junctions ...[2]string) error
- func GetDirFilenames(dir string) ([]string, error)
- func GetPersistentEnvValue(key string) (string, string, error)
- func GetPersistentEnvValues() (map[string]string, error)
- func GetShellExecutable() (string, error)
- func SetPersistentEnvValue(key, value string) error
- func SetPersistentEnvValues(vars ...[2]string) error
- type PROCESSENTRY32
- type Paths
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arch ¶
func Arch() string
Arch retrieves the runtime architecture. This might differ from the compile time architecture. hence GOARCH can't be used here.
func CreateJunctions ¶ added in v0.0.4
CreateJunction will create multiple junctions. Each pair reflects one junction ([2]string{existing_dir, link_location}). A junction as a hardlink to a directory. This means, that we hardlink to the drive-sections, which results in deletions not affecting the actual data, as long as there are still references.
func GetDirFilenames ¶ added in v0.0.4
func GetPersistentEnvValue ¶ added in v0.0.4
GetPersistentEnvValue retrieves a persistent user level environment variable. The first returned value is the key and the second the value. While the key is defined in the query, the casing might be different, which COULD matter. If nothing was found, we return empty strings without an error.
func GetPersistentEnvValues ¶ added in v0.0.4
func GetShellExecutable ¶ added in v0.0.4
func SetPersistentEnvValue ¶ added in v0.0.4
Sets a User-Level Environment variable. An empty value will remove the key completly.
func SetPersistentEnvValues ¶ added in v0.0.4
Types ¶
type PROCESSENTRY32 ¶ added in v0.0.4
type PROCESSENTRY32 struct { Size uint32 ProcessID uint32 ParentProcessID uint32 // ExeFile is expected to be at max 260 chars, as windows by default doesn't // support long paths. While this could fail, we'll ignore this for now, as // it is unlikely to happen. ExeFile [260]uint16 // contains filtered or unexported fields }
PROCESSENTRY32 is a process as defined by Windows. We've simple padded everything with unused field, to be able to parse everything and indicate that the fields are unused at the same time.
type Paths ¶ added in v0.0.4
type Paths []string
func ParsePath ¶ added in v0.0.4
ParsePath will break the path variable content down into separate paths. This also handles quoting. The order is preserved.
func (Paths) Prepend ¶ added in v0.0.4
Preprend will create a new Paths object, adding the supplied paths infront, using the given order.