path

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package path 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

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 IsSet

func IsSet(path string) bool

func IsSubPath

func IsSubPath(parent, sub string) bool

IsSubPath determines if sub is a subdirectory of parent

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

func UnsetENV

func UnsetENV(path string) error

Types

type Config

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

func (*Config) GetRCFilePath

func (c *Config) GetRCFilePath() (string, error)

Jump to

Keyboard shortcuts

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