Documentation
¶
Overview ¶
Package paths provides information on where to find and store files.
Index ¶
- func Bookmarks() string
- func CacheDir() string
- func CheckForMisplacedBookmarks()
- func CheckForMisplacedSearchIndex()
- func CheckForMisplacedSettings()
- func ConfigDir() string
- func DataDir() string
- func EnsureCacheDir() error
- func EnsureConfigDir() error
- func EnsureDataDir() error
- func Init(appID string)
- func LocaleDir() string
- func SearchIndex() string
- func Settings() string
- type Builder
- func (b Builder) Bookmarks() string
- func (b Builder) CacheDir() string
- func (b Builder) ConfigDir() string
- func (b Builder) DataDir() string
- func (b Builder) EnsureCacheDir() error
- func (b Builder) EnsureConfigDir() error
- func (b Builder) EnsureDataDir() error
- func (b Builder) LocaleDir() string
- func (b Builder) SearchIndex() string
- func (b Builder) Settings() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bookmarks ¶ added in v1.5.3
func Bookmarks() string
Bookmarks returns the path to the user's bookmarks file.
func CheckForMisplacedBookmarks ¶ added in v1.5.3
func CheckForMisplacedBookmarks()
CheckForMisplacedBookmarks prints a warning message to standard error if there are any stray bookmark files that may have been caused by a bug that commit d13e4dc0ff81e9d12df29e7f9be4e82e7f70cc01 fixed.
func CheckForMisplacedSearchIndex ¶ added in v1.6.4
func CheckForMisplacedSearchIndex()
CheckForMisplacedSearchIndex prints a warning message to standard error if there are any stray bookmark files that may have been caused by a bug that commit d13e4dc0ff81e9d12df29e7f9be4e82e7f70cc01 fixed.
func CheckForMisplacedSettings ¶ added in v1.5.3
func CheckForMisplacedSettings()
CheckForMisplacedSettings prints a warning message to standard error if there are any stray configuration files that may have been caused by a bug that commit d13e4dc0ff81e9d12df29e7f9be4e82e7f70cc01 fixed.
func ConfigDir ¶
func ConfigDir() string
ConfigDir returns the path to our app's user configuration directory.
func EnsureCacheDir ¶
func EnsureCacheDir() error
EnsureCacheDir creates the CacheDir() directory, if it doesn't exist. It does not return an error if it already exists.
func EnsureConfigDir ¶
func EnsureConfigDir() error
EnsureConfigDir creates the ConfigDir() directory, if it doesn't exist. It does not return an error if it already exists.
func EnsureDataDir ¶
func EnsureDataDir() error
EnsureDataDir creates the DataDir() directory, if it doesn't exist. It does not return an error if it already exists.
func Init ¶
func Init(appID string)
Init initializes the paths package. Must be called before calling other package functions.
func SearchIndex ¶ added in v1.6.4
func SearchIndex() string
SearchIndex returns the path to the application's search index.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder provides methods to find the paths where the app should store the files it creates.
func (Builder) EnsureCacheDir ¶
EnsureCacheDir creates the CacheDir() directory, if it doesn't exist. It does not return an error if it already exists.
func (Builder) EnsureConfigDir ¶
EnsureConfigDir creates the ConfigDir() directory, if it doesn't exist. It does not return an error if it already exists.
func (Builder) EnsureDataDir ¶
EnsureDataDir creates the DataDir() directory, if it doesn't exist. It does not return an error if it already exists.
func (Builder) SearchIndex ¶ added in v1.6.4
SearchIndex returns the path to the application's search index.