path

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 7 Imported by: 0

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

View Source
var CommonExtensions = []string{"", ".exe", ".bat"}

Functions

func CheckOS

func CheckOS() string

func GetExecutablePath added in v0.0.4

func GetExecutablePath(path, toolName string) (string, bool)

func GetOsData

func GetOsData() string

func IndexOf

func IndexOf(paths []string, p string) (int, error)

IndexOf searches the given path list for first occurence of the given path entry and returns the index, or -1

func NormalizePathEntry

func NormalizePathEntry(pathentry string) (string, string, error)

NormalizePathEntry will return the given directory path relative from its absolute path to the %USERPROFILE% (home) directory.

func SetENV

func SetENV(path string) error

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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