config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDirectoryTraversal    = errors.New("apps directory path contains directory traversal sequences")
	ErrOutsideHomeDirectory  = errors.New("apps directory path is outside the user's home directory")
	ErrAbsolutePathNotInHome = errors.New("absolute apps directory path must be within the user's home directory")
	ErrNotADirectory         = errors.New("path is not a directory")
	ErrNotWritable           = errors.New("directory is not writable: missing write permission")
	ErrSymlinkResolution     = errors.New("failed to resolve symlinks in path")
)

Functions

func EnsureAppsDirectory

func EnsureAppsDirectory() (string, error)

EnsureAppsDirectory creates the apps directory if it doesn't exist and verifies it's writable Returns the apps directory path

func GetAppsDirectory

func GetAppsDirectory() (string, error)

GetAppsDirectory returns the apps directory path. It first checks the LAYERED_APPS_DIRECTORY environment variable, and if not set, defaults to ~/LayeredApps

func IsWithinDirectory added in v0.0.2

func IsWithinDirectory(targetPath, baseDir string) bool

IsWithinDirectory checks if the target path is within the base directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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