appdirs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT 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

Overview

Package appdirs resolves vmflow-owned configuration locations without tying them to the executable directory.

Index

Constants

View Source
const (
	ConfigFilename    = "config.yaml"
	ManagedMarkerName = ".vmflow-managed"

	LinuxSystemConfigPath  = "/etc/vmflow/config.yaml"
	DarwinSystemConfigPath = "/Library/Application Support/vmflow/config.yaml"
	WindowsProgramData     = `C:\ProgramData`
)

Variables

This section is empty.

Functions

func ConfigPath

func ConfigPath(scope Scope) (string, error)

ConfigPath returns the canonical config path for scope on the current OS.

func IsCanonicalConfigPath

func IsCanonicalConfigPath(candidate string, scope Scope) bool

IsCanonicalConfigPath reports whether candidate is the current machine's canonical path for scope. It is used before placing an ownership marker so a custom -config directory is never claimed by vmflow.

func ManagedMarkerPath

func ManagedMarkerPath(configPath string) string

ManagedMarkerPath returns the ownership marker beside a config file.

func SystemConfigPath

func SystemConfigPath() (string, error)

SystemConfigPath returns the config path used by the native system service.

func UserConfigPath

func UserConfigPath() (string, error)

UserConfigPath returns the config path used by vmflow run and user-scoped initialization.

Types

type Scope

type Scope uint8

Scope identifies whether configuration belongs to a user-run process or to the machine-wide native service.

const (
	User Scope = iota
	System
)

Jump to

Keyboard shortcuts

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