(id win.CSIDL)
| 13 | ) |
| 14 | |
| 15 | func knownFolderPath(id win.CSIDL) (string, error) { |
| 16 | var buf [win.MAX_PATH]uint16 |
| 17 | |
| 18 | if !win.SHGetSpecialFolderPath(0, &buf[0], id, false) { |
| 19 | return "", newError("SHGetSpecialFolderPath failed") |
| 20 | } |
| 21 | |
| 22 | return syscall.UTF16ToString(buf[0:]), nil |
| 23 | } |
| 24 | |
| 25 | func AppDataPath() (string, error) { |
| 26 | return knownFolderPath(win.CSIDL_APPDATA) |
no test coverage detected
searching dependent graphs…