knowndir

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias string
const (
	ApacheLinuxPath     Alias = "/etc/apache/"
	AppData             Alias = "AppData"
	AppDataUnix         Alias = "/usr/share"
	Bin                 Alias = "bin"
	BinUnix             Alias = "/usr/bin"
	Documents           Alias = "Documents"
	Downloads           Alias = "Downloads"
	Drivers             Alias = "drivers"
	DriversUnix         Alias = "/lib/modules/$(uname -r)/kernel/drivers/"
	Etc                 Alias = "etc"
	Fonts               Alias = "Fonts"
	FontsUnix           Alias = "usr/share/fonts"
	GitGlobalWin        Alias = ".gitconfig"
	GitGlobalUnix       Alias = "/etc/gitconfig"
	GitGlobalUnixXdg    Alias = "XDG_CONFIG_HOME/git/config"
	HostFile            Alias = "hosts"
	Local               Alias = "Local"
	LocalTempWin        Alias = "local\\temp"
	LocalTempUnix       Alias = "tmp"
	Music               Alias = "Music"
	NginxLinuxPath      Alias = "/etc/nginx/"
	Pictures            Alias = "Pictures"
	ProgramFiles32Or64  Alias = "Program Files"
	ProgramFilesX32In64 Alias = "Program Files (x86)"
	ProgramData         Alias = "Program Data"
	Roaming             Alias = "Roaming"
	Services            Alias = "services"
	SSHGlobal           Alias = ".ssh"
	System32            Alias = "System32"
	System64            Alias = "SysWOW64"
	SystemUnix          Alias = "/etc/systemd/system"
	Temp                Alias = "Temp"
	TempDir             Alias = "TMPDIR"
	UnixRoot            Alias = "/"
	User                Alias = "User"
	UserBin             Alias = "UserBin"
	Users               Alias = "Users"
	Videos              Alias = "Videos"
	WindowsDirectory    Alias = "windir"
	WindowsCDrive       Alias = "C:\\"
	// for paths of nginx and  apache
	Conf             Alias = "conf.d"
	ConfAvailable    Alias = "conf-available"
	ConfEnabled      Alias = "conf-enabled"
	ModsAvailable    Alias = "mods-available"
	ModsEnabled      Alias = "mods-enabled"
	ModulesAvailable Alias = "modules-available"
	ModulesEnabled   Alias = "modules-enabled"
	SitesAvailable   Alias = "sites-available"
	SitesEnabled     Alias = "sites-enabled"
	MimeTypes        Alias = "mime.types"
	EtcEnvironment   Alias = "/etc/environment"
)

func (Alias) CombineWith

func (alias Alias) CombineWith(paths ...string) string

func (Alias) CombineWithKnownDirs

func (alias Alias) CombineWithKnownDirs(knownDirectories ...Alias) string

CombineWithKnownDirs directory.Value() + constants.PathSeparator + knownDirectories.join(constants.PathSeparator) Warning: It doesn't perform complex tasks like long path normalize, long path (windows) fix, double separator to single and so on.

func (Alias) GetPrefixCombinedWith

func (alias Alias) GetPrefixCombinedWith(paths ...string) string

GetPrefixCombinedWith Alias.Value() + constants.PathSeparator + paths with separator Warning: It doesn't perform complex tasks like long path normalize, long path (windows) fix, double separator to single and so on.

func (Alias) String added in v0.1.2

func (alias Alias) String() string

func (Alias) Value

func (alias Alias) Value() string

func (Alias) ValuePtr

func (alias Alias) ValuePtr() *string

type AliasStruct

type AliasStruct struct {
	Name    string
	Alias   Alias
	Linux   *os.Linux
	Windows *os.Windows
	Mac     *os.Mac
	// contains filtered or unexported fields
}

func (*AliasStruct) GetCurrentDir

func (a *AliasStruct) GetCurrentDir() (
	string, *errorwrapper.Wrapper,
)

func (*AliasStruct) GetDir

func (a *AliasStruct) GetDir(
	architecture osarchs.Architecture,
	osType ostype.Variation,
) (
	string, *errorwrapper.Wrapper,
)

func (*AliasStruct) GetDirMust

func (a *AliasStruct) GetDirMust(
	architecture osarchs.Architecture,
	osType ostype.Variation,
) string

func (*AliasStruct) GetDirSpecifier

func (a *AliasStruct) GetDirSpecifier(
	osType ostype.Variation,
) (
	os.DirSpecifier,
	*errorwrapper.Wrapper,
)

func (*AliasStruct) HasLinux

func (a *AliasStruct) HasLinux() bool

func (*AliasStruct) HasMac

func (a *AliasStruct) HasMac() bool

func (*AliasStruct) HasOsSpecifics

func (a *AliasStruct) HasOsSpecifics() bool

func (*AliasStruct) HasWindows

func (a *AliasStruct) HasWindows() bool

func (*AliasStruct) IsLinuxEmpty

func (a *AliasStruct) IsLinuxEmpty() bool

func (*AliasStruct) IsMacEmpty

func (a *AliasStruct) IsMacEmpty() bool

func (*AliasStruct) IsOsSpecificsEmpty

func (a *AliasStruct) IsOsSpecificsEmpty() bool

func (*AliasStruct) IsWindowsEmpty

func (a *AliasStruct) IsWindowsEmpty() bool

func (*AliasStruct) Specifics

func (a *AliasStruct) Specifics() os.DirSpecifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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