paths

package
v0.9.0-rc.53 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EnvDataDir  = "PWIKIT_DATA_DIR"
	DataDirFile = "pwikit.data-dir"
)

Variables

View Source
var ErrEscapes = errors.New("path escapes its base directory")

Functions

func Resolve

func Resolve(base, rel string) (string, error)

Types

type Jail

type Jail struct {
	// contains filtered or unexported fields
}

func In

func In(base string) Jail

func (Jail) Create

func (j Jail) Create(full string) (*os.File, error)

func (Jail) MkdirAll

func (j Jail) MkdirAll(full string, perm fs.FileMode) error

func (Jail) Open

func (j Jail) Open(full string) (*os.File, error)

func (Jail) OpenFile

func (j Jail) OpenFile(full string, flag int, perm fs.FileMode) (*os.File, error)

func (Jail) ReadFile

func (j Jail) ReadFile(full string) ([]byte, error)

func (Jail) Remove

func (j Jail) Remove(full string) error

func (Jail) RemoveAll

func (j Jail) RemoveAll(full string) error

func (Jail) Rename

func (j Jail) Rename(from, to string) error

func (Jail) WriteFile

func (j Jail) WriteFile(full string, data []byte, perm fs.FileMode) error

type Paths

type Paths struct {
	// contains filtered or unexported fields
}

func New

func New(override string) (*Paths, error)

func (*Paths) Archive

func (p *Paths) Archive() string

func (*Paths) Backups

func (p *Paths) Backups() string

func (*Paths) Certs

func (p *Paths) Certs() string

func (*Paths) Config

func (p *Paths) Config() string

func (*Paths) EnsureBase

func (p *Paths) EnsureBase() error

func (*Paths) Files

func (p *Paths) Files() string

func (*Paths) Locales

func (p *Paths) Locales() string

func (*Paths) Logs

func (p *Paths) Logs() string

func (*Paths) PGData

func (p *Paths) PGData() string

func (*Paths) Plugins

func (p *Paths) Plugins() string

func (*Paths) Postgres

func (p *Paths) Postgres() string

func (*Paths) Root

func (p *Paths) Root() string

func (*Paths) Secrets

func (p *Paths) Secrets() string

func (*Paths) Source

func (p *Paths) Source() Source

func (*Paths) Updates

func (p *Paths) Updates() string

type Source

type Source string
const (
	SourceExplicit   Source = "explicit"
	SourceEnv        Source = "env"
	SourceExecutable Source = "executable"
	SourceGoRun      Source = "go-run"
)

Jump to

Keyboard shortcuts

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