windows

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

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

func CreateJunctions(junctions ...[2]string) error

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 GetDirFilenames(dir string) ([]string, error)

func GetPersistentEnvValues added in v0.0.4

func GetPersistentEnvValues() (map[string]string, error)

func GetShellExecutable added in v0.0.4

func GetShellExecutable() (string, error)

func SetPersistentEnvValue added in v0.0.4

func SetPersistentEnvValue(key, value string) error

Sets a User-Level Environment variable. An empty value will remove the key completly.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL