paths

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 5 Imported by: 0

Documentation

Overview

Package paths provides CLI directory and file path resolution Per AI.md PART 36: CLI paths follow XDG on Linux, standard locations on Windows

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheDir

func CacheDir() string

CacheDir returns the CLI cache directory Linux: ~/.cache/apimgr/search/ Windows: %LOCALAPPDATA%\apimgr\search\cache\

func ConfigDir

func ConfigDir() string

ConfigDir returns the CLI config directory Linux: ~/.config/apimgr/search/ Windows: %APPDATA%\apimgr\search\

func ConfigFile

func ConfigFile() string

ConfigFile returns the CLI config file path

func DataDir

func DataDir() string

DataDir returns the CLI data directory Linux: ~/.local/share/apimgr/search/ Windows: %LOCALAPPDATA%\apimgr\search\data\

func EnsureDirs

func EnsureDirs() error

EnsureDirs creates all CLI directories with correct permissions. Called on every startup before any file operations. Per AI.md PART 36: CLI Startup Sequence (NON-NEGOTIABLE)

func EnsureFile

func EnsureFile(path string, perm os.FileMode) error

EnsureFile creates parent dirs and sets permissions before writing. MUST be called before any file creation.

func LogDir

func LogDir() string

LogDir returns the CLI log directory Linux: ~/.local/log/apimgr/search/ Windows: %LOCALAPPDATA%\apimgr\search\log\

func LogFile

func LogFile() string

LogFile returns the CLI log file path

func ResolveConfigPath

func ResolveConfigPath(configFlag string) (string, error)

ResolveConfigPath resolves --config flag to absolute path Per AI.md PART 36: --config Flag (Config File Selection)

Types

This section is empty.

Jump to

Keyboard shortcuts

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