Documentation ¶
Index ¶
- func ApacheLinuxPath() string
- func AppDataPath() string
- func BinPath() string
- func EtcPath() string
- func FontsPath() string
- func GetNginxLinuxPathWith(directory knowndir.Alias) string
- func GetProgramFiles32() string
- func GetRoot() string
- func GetServicesPath() string
- func GetSystem64() string
- func GetSystemDriversPath() string
- func GetSystemPath() string
- func GitGlobal() string
- func GoBin() string
- func GoPath() string
- func HostFilePath() string
- func LocalPath() string
- func LocalTempPath() string
- func NginxLinuxPath() string
- func ProgramData() string
- func ProgramFiles() string
- func ProgramFiles64() string
- func SSHGlobal() string
- func System32() string
- func TempDirectory() string
- func TempPath() string
- func UnixRoot() string
- func UserDocumentsPath() string
- func UserDownloadsPath() string
- func UserMusicPath() string
- func UserPath() string
- func UserPicturesPath() string
- func UserRoamingPath() string
- func UserVideosPath() string
- func UsersPath() string
- func WidowsDirectory() string
- func WindowsRoot() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppDataPath ¶
func AppDataPath() string
AppDataPath Returns path to %AppData% in windows. If directory doesn't exist it still returns the path as a string. Requires further investigation for linux platform: https://stackoverflow.com/questions/1510104/where-to-store-application-data-non-user-specific-on-linux, https://stackoverflow.com/questions/17517131/appdata-in-non-windows
func FontsPath ¶
func FontsPath() string
FontsPath
Returns path to Fonts directory on different platforms.
func GetNginxLinuxPathWith ¶
"/etc/nginx/" + directory.Value()
func GetProgramFiles32 ¶
func GetProgramFiles32() string
Returns Program Files directory on windows with OS architecture x32
In 32 bit machine program files is just program file, in 64 bit program files is x86 ¶
Reference : https://bit.ly/3tX95N6
func GetServicesPath ¶
func GetServicesPath() string
Returns path to Services directory on different platforms.
func GetSystemDriversPath ¶
func GetSystemDriversPath() string
Returns path to System drivers directory on different platforms.
func GetSystemPath ¶
func GetSystemPath() string
Returns path to System directory on different platforms.
func GitGlobal ¶
func GitGlobal() string
Returns path to .git. Checks for it on all possible locations. If .git doesn't exist creates it. todo should we use createDirectory to make .git . is it a directory or a file
func GoPath ¶
func GoPath() string
Reference: https://stackoverflow.com/a/32650077 Returns env go path : os.Getenv(constants.GoPath) or build.Default.GOPATH
func LocalPath ¶
func LocalPath() string
Returns path to local directory in windows. Otherwise returns Users directory.
func LocalTempPath ¶
func LocalTempPath() string
Returns path to local temp directory. If directory doesn't exist it still returns the path as a string.
func ProgramData ¶
func ProgramData() string
func ProgramFiles ¶
func ProgramFiles() string
Returns Program Files directory on windows with OS architecture x32
In 32 bit machine program files is just program file, in 64 bit program files is x86 ¶
Reference : https://bit.ly/3tX95N
func ProgramFiles64 ¶
func ProgramFiles64() string
ProgramFiles64
Returns Program Files directory on windows with OS architecture x64 ¶
Program files for x64 bit is always `Program Files`, one cannot install x64 bit application on a x32 bit machine.
Reference : https://bit.ly/3tX95N6
func TempDirectory ¶
func TempDirectory() string
func TempPath ¶
func TempPath() string
Returns temp directory. After checking in on all possible locations, if directory doesn't exist, then doesnt create the directory and returns the path as a string.
func UserDocumentsPath ¶
func UserDocumentsPath() string
Returns documents directory path as a string.
func UserDownloadsPath ¶
func UserDownloadsPath() string
Returns downloads directory path as a string.
func WidowsDirectory ¶
func WidowsDirectory() string
WidowsDirectory
Returns windows directory path.
func WindowsRoot ¶
func WindowsRoot() string
Returns Windows root as a string
Drive letter + colon, from Windows 7 onwards it is c:\ constant. However to be precise it gets windir and gets the dir symbol Returns `c:\`
Reference : https://play.golang.org/p/ZtXTSczrevD
Types ¶
This section is empty.
Source Files ¶
- ApacheLinuxPath.go
- AppDataPath.go
- BinPath.go
- EtcPath.go
- FontsPath.go
- GetRoot.go
- GitGlobal.go
- GoBin.go
- GoPath.go
- HostFilePath.go
- LocalPath.go
- LocalTempPath.go
- NginxLinuxPath.go
- NginxLinuxPathWith.go
- ProgramData.go
- ProgramFiles.go
- ProgramFiles32.go
- ProgramFiles64.go
- SSHGlobal.go
- ServicesPath.go
- System32.go
- System64.go
- SystemDriversPath.go
- SystemPath.go
- TempDirectory.go
- TempPath.go
- UnixRoot.go
- UserDocumentsPath.go
- UserDownloadsPath.go
- UserMusicPath.go
- UserPath.go
- UserPicturesPath.go
- UserRoamingPath.go
- UserVideosPath.go
- UsersPath.go
- WidowsDirectory.go
- WindowsRoot.go