paths

package
v0.0.0-...-6a4bd28 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) (bool, error)

func ExistsDir

func ExistsDir(path string) (bool, error)

func ExistsFile

func ExistsFile(path string) (bool, error)
func ExistsSymlink(path string) (bool, error)

func ExpandAll

func ExpandAll(path string) string

func ExpandUser

func ExpandUser(path string) string

func GetAllConfigDirs

func GetAllConfigDirs() []string

if exists(configHome) + configDirs

func GetAllDataDirs

func GetAllDataDirs() []string

if exists(dataHome) + dataDirs

func GetAppCacheDir

func GetAppCacheDir() string

func GetAppConfigDir

func GetAppConfigDir() string

func GetAppDataDir

func GetAppDataDir() string

func GetAppIconCacheDir

func GetAppIconCacheDir() string

func GetCacheHome

func GetCacheHome() string

func GetConfigDirs

func GetConfigDirs() []string

func GetConfigHome

func GetConfigHome() string

func GetDataDirs

func GetDataDirs() []string

func GetDataHome

func GetDataHome() string

func GetEnv

func GetEnv(key string) (string, bool)

func GetEnvDef

func GetEnvDef(key string, defValue string) string

func GetSysTmp

func GetSysTmp() string

func GetUserHome

func GetUserHome() string

func New

func New() error

func Walk

func Walk(dirPath string, logger *zap.Logger, fn WalkFunc)

Types

type PathMode

type PathMode uint8
const (
	ModeUnknown     PathMode = 0
	ModeNamedPipe   PathMode = 1 << 0
	ModeCharDevice  PathMode = 1 << 1 // character-oriented device file
	ModeBlockDevice PathMode = 1 << 2 // block-oriented device file
	ModeDir         PathMode = 1 << 3
	ModeRegFile     PathMode = 1 << 4
	ModeSymlink     PathMode = 1 << 5
	ModeSocket      PathMode = 1 << 6
)

func LStatMode

func LStatMode(path string) (PathMode, error)

type WalkFunc

type WalkFunc func(path string, mode PathMode)

Jump to

Keyboard shortcuts

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