Documentation ¶
Index ¶
- func NewErrFileSystem(err error, path, msg string) error
- type ErrFileSystem
- type Option
- type System
- func (s *System) ConfigPath() string
- func (s *System) CreatePath(path string)
- func (s *System) DirExists(path string) bool
- func (s *System) FileExists(path string) bool
- func (s *System) HomeDir() string
- func (s *System) HomeEnvValue() string
- func (s *System) IsEmpty(path string) bool
- func (s *System) ReadFile(path string) []byte
- func (s *System) Remove(path string)
- func (s *System) RemoveAll(path string)
- func (s *System) ThemesDir() string
- func (s *System) UserConfigDirs() []string
- func (s *System) UserContainerPreferences(appID string) (string, error)
- func (s *System) UserContainersHome() string
- func (s *System) UserDataHome() string
- func (s *System) UserHome() string
- func (s *System) WriteFile(path string, data []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrFileSystem ¶
Types ¶
type ErrFileSystem ¶
type ErrFileSystem struct {
// contains filtered or unexported fields
}
func (ErrFileSystem) Error ¶
func (e ErrFileSystem) Error() string
func (ErrFileSystem) Is ¶
func (e ErrFileSystem) Is(target error) bool
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures a Provider.
func WithConfigCome ¶
WithConfigCome sets the primary config home directory of the user.
func WithUserConfigDirs ¶
WithUserConfigDirs sets the config directories of the user.
func WithUserContainersDir ¶
WithUserContainersDir sets the data directory of the user.
func WithUserDataDir ¶
WithUserDataDir sets the data directory of the user.
func WithUserHome ¶ added in v1.2.0
WithUserHome sets the home directory of the user.
type System ¶
func (*System) ConfigPath ¶
func (*System) CreatePath ¶
CreatePath returns a suitable location relative to which the file pointed by `path` can be written.
func (*System) FileExists ¶ added in v1.3.0
func (*System) HomeEnvValue ¶ added in v1.0.0
func (*System) UserConfigDirs ¶
func (*System) UserContainerPreferences ¶
func (*System) UserContainersHome ¶
func (*System) UserDataHome ¶
Click to show internal directories.
Click to hide internal directories.