pathutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigDir is the rong config directory
	ConfigDir = filepath.Clean(filepath.Join(xdg.ConfigHome, app))
	CacheDir  = filepath.Clean(filepath.Join(xdg.CacheHome, app))
	StateDir  = filepath.Clean(filepath.Join(xdg.StateHome, app))
)

Functions

func FindPath

func FindPath(basePath, inputPath string) (string, error)

FindPath expands environment-aware variables and returns an absolute path from a given base path (not CWD). Path Prefix Expands:

  • $HOME or ~ : xdg.Home
  • $XDG_CONFIG_HOME: xdg.ConfigHome
  • $XDG_CACHE_HOME : xdg.CacheHome
  • $XDG_DATA_HOME : xdg.DataHome
  • $RONG_CONFIG : xdg.ConfigHome + "rong"
  • $RONG_CACHE : xdg.CacheHome + "rong"
  • $RONG_DATA : xdg.DataHome + "rong"

Types

This section is empty.

Jump to

Keyboard shortcuts

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