1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
// +build !windows,!darwin
package xdg
import "os"
func DesktopDir() string { return altHome(os.Getenv(DesktopDirEnv), "Desktop") }
func DownloadDir() string { return altHome(os.Getenv(DownloadDirEnv), "Downloads") }
func DocumentsDir() string { return altHome(os.Getenv(DocumentsDirEnv), "Documents") }
func MusicDir() string { return altHome(os.Getenv(MusicDirEnv), "Music") }
func PicturesDir() string { return altHome(os.Getenv(PicturesDirEnv), "Pictures") }
func VideosDir() string { return altHome(os.Getenv(VideosDirEnv), "Videos") }
func TemplatesDir() string { return altHome(os.Getenv(TemplatesDirEnv), "Templates") }
func PublicShareDir() string { return altHome(os.Getenv(PublicShareDirEnv), "Public") }
|