File: user_win.go

package info (click to toggle)
golang-github-kyoh86-xdg 1.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid
  • size: 184 kB
  • sloc: makefile: 13
file content (14 lines) | stat: -rw-r--r-- 797 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// +build windows

package xdg

import "os"

func DesktopDir() string     { return altUserProfile(os.Getenv(DesktopDirEnv), "Desktop") }
func DownloadDir() string    { return altUserProfile(os.Getenv(DownloadDirEnv), "Downloads") }
func DocumentsDir() string   { return altUserProfile(os.Getenv(DocumentsDirEnv), "Documents") }
func MusicDir() string       { return altUserProfile(os.Getenv(MusicDirEnv), "Music") }
func PicturesDir() string    { return altUserProfile(os.Getenv(PicturesDirEnv), "Pictures") }
func VideosDir() string      { return altUserProfile(os.Getenv(VideosDirEnv), "Videos") }
func TemplatesDir() string   { return altUserProfile(os.Getenv(TemplatesDirEnv), "Templates") }
func PublicShareDir() string { return alternate(os.Getenv(PublicShareDirEnv), os.Getenv("PUBLIC")) }