paths

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package paths resolves every Ozy install location behind one abstraction so the installer and uninstaller never hardcode directories. It follows the conventions already used by internal/config (XDG config home) and internal/sidecar (state-dir venv): XDG-style locations on Linux and macOS, the %APPDATA%/%LOCALAPPDATA% conventions on Windows. Documented overrides (OZY_CONFIG and the XDG_* variables) take precedence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnPath

func OnPath(dir, pathList, goos string) bool

OnPath reports whether dir is one of the entries in a PATH-style list. goos selects the list separator and case sensitivity so it is testable for any platform from any host.

Types

type Paths

type Paths struct {
	ConfigDir  string // directory holding ozy.jsonc
	ConfigFile string // ozy.jsonc path (honors OZY_CONFIG)
	DataDir    string // models / vector assets live under here
	CacheDir   string // disposable cache
	StateDir   string // durable runtime state (install state, logs, venv)
	LogDir     string // installer/uninstaller logs
	VenvDir    string // managed Python venv (passed to sidecar.Provision)
	AssetDir   string // downloaded embedding/vector assets
	UserBinDir string // where the ozy binary is installed
	BinaryPath string // resolved ozy binary path
}

Paths holds every resolved Ozy location. Consumers read these fields instead of recomputing or hardcoding paths.

func Resolve

func Resolve() Paths

Resolve returns the locations for the current OS and environment.

func (Paths) Reachable

func (p Paths) Reachable() bool

Reachable reports whether the user bin directory is on the current PATH. It never mutates the environment.

Jump to

Keyboard shortcuts

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