File: doc.go

package info (click to toggle)
golang-github-apparentlymart-go-userdirs 0.0~git20200915.b0c018a-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 184 kB
  • sloc: makefile: 2
file content (39 lines) | stat: -rw-r--r-- 2,303 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Package userdirs is a utility for building user-specific filesystem paths
// for applications to store configuration information, caches, etc.
//
// It aims to conform to the conventions of the operating system where it is
// running, allowing applications using this package to follow the relevant
// conventions automatically.
//
// Because the behavior of this library must be tailored for each operating
// system it supports, it supports only a subset of Go's own supported
// operating system targets. Others are intentionally not supported (rather than
// mapped on to some default OS) to avoid the situation where adding a new
// supported OS would change the behavior of existing applications built for
// that OS.
//
// Currently this package supports Mac OS X ("darwin"), Linux and Windows
// first-class. It also maps AIX, Dragonfly, FreeBSD, NetBSD, and Solaris,
// following the same rules as for Linux.
//
// On Mac OS X, we follow the Standard Directories guidelines from
// https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW6 .
//
// On Linux and other Unix-like systems, we follow the XDG Base Directory
// specification version 0.8, from https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.8.html .
//
// On Windows, we use the Known Folder API and follow relevant platform conventions
// https://docs.microsoft.com/en-us/windows/desktop/shell/knownfolderid .
//
// On all other systems, the directory-construction functions will panic. Use
// the SupportedOS function to determine whether this function's packages are
// available on the current operating system target, to avoid those panics.
// However, in practice it probably doesn't make much sense to use this package
// when building for an unsupported operating system anyway.
//
// Additional operating systems may be supported in future releases. Once an
// operating system is supported, the constructed paths are frozen to ensure
// that applications can find their same files on future versions. Therefore
// the bar for adding support for a new operating system is there being a
// committed standard published by the operating system vendor.
package userdirs