paths

package
v1.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package paths provides information on where to find and store files.

Index

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 CacheDir

func CacheDir() string

CacheDir returns the path to our app's cache directory.

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 DataDir

func DataDir() string

DataDir returns the path to our app's user data 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 LocaleDir

func LocaleDir() string

LocaleDir returns the path to the system locale directory.

func SearchIndex added in v1.6.4

func SearchIndex() string

SearchIndex returns the path to the application's search index.

func Settings added in v1.5.3

func Settings() string

Settings returns the path to the user's settings file.

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) Bookmarks added in v1.5.3

func (b Builder) Bookmarks() string

Bookmarks returns the path to the user's bookmarks file.

func (Builder) CacheDir

func (b Builder) CacheDir() string

CacheDir returns the path to our app's cache directory.

func (Builder) ConfigDir

func (b Builder) ConfigDir() string

ConfigDir returns the path to our app's user configuration directory.

func (Builder) DataDir

func (b Builder) DataDir() string

DataDir returns the path to our app's user data directory.

func (Builder) EnsureCacheDir

func (b Builder) EnsureCacheDir() error

EnsureCacheDir creates the CacheDir() directory, if it doesn't exist. It does not return an error if it already exists.

func (Builder) EnsureConfigDir

func (b Builder) EnsureConfigDir() error

EnsureConfigDir creates the ConfigDir() directory, if it doesn't exist. It does not return an error if it already exists.

func (Builder) EnsureDataDir

func (b Builder) EnsureDataDir() error

EnsureDataDir creates the DataDir() directory, if it doesn't exist. It does not return an error if it already exists.

func (Builder) LocaleDir

func (b Builder) LocaleDir() string

LocaleDir returns the path to the system locale directory.

func (Builder) SearchIndex added in v1.6.4

func (b Builder) SearchIndex() string

SearchIndex returns the path to the application's search index.

func (Builder) Settings added in v1.5.3

func (b Builder) Settings() string

Settings returns the path to the user's settings file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL