MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / GetUserHomeDirectory

Function GetUserHomeDirectory

src/toolchain.go:122–142  ·  view source on GitHub ↗

GetUserHomeDirectory : Benutzer Homer Verzeichnis

()

Source from the content-addressed store, hash-verified

120
121// GetUserHomeDirectory : Benutzer Homer Verzeichnis
122func GetUserHomeDirectory() (userHomeDirectory string) {
123
124 usr, err := user.Current()
125
126 if err != nil {
127
128 for _, name := range []string{"HOME", "USERPROFILE"} {
129
130 if dir := os.Getenv(name); dir != "" {
131 userHomeDirectory = dir
132 break
133 }
134
135 }
136
137 } else {
138 userHomeDirectory = usr.HomeDir
139 }
140
141 return
142}
143
144// Prüft Dateiberechtigung
145func checkFilePermission(dir string) (err error) {

Callers 2

threadfin.goFile · 0.92
InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected