pathsutils

package
v0.250.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPathHasNoParentDirectory = errors.New("path has no parent directory")

Functions

func CheckAbsolutePath

func CheckAbsolutePath(path string) (err error)

func CheckRelativePath

func CheckRelativePath(path string) (err error)

func FilterPaths

func FilterPaths(pathList []string, pathFilterOptions parameteroptions.PathFilterOptions) (filtered []string, err error)

Filter the given path list.

func GetAbsolutePath

func GetAbsolutePath(path string) (absolutePath string, err error)

func GetDirPath

func GetDirPath(inputPath string) (dirPath string, err error)

func GetRelativePathTo

func GetRelativePathTo(absolutePath string, relativeTo string) (relativePath string, err error)

func GetRelativePathsTo

func GetRelativePathsTo(absolutePaths []string, relativeTo string) (relativePaths []string, err error)

func IsAbsolutePath

func IsAbsolutePath(path string) (isAbsolute bool)

Returns true if path is an absolute path. An empty string as path will always be false.

func IsRelativePath

func IsRelativePath(path string) (isRelative bool)

Returns true if path is a relative path. An empty string as path will always be false.

func MustCheckAbsolutePath

func MustCheckAbsolutePath(path string)

func MustCheckRelativePath

func MustCheckRelativePath(path string)

func MustFilterPaths

func MustFilterPaths(pathList []string, pathFilterOptions parameteroptions.PathFilterOptions) (filtered []string)

func MustGetAbsolutePath

func MustGetAbsolutePath(path string) (absolutePath string)

func MustGetDirPath

func MustGetDirPath(inputPath string) (dirPath string)

func MustGetRelativePathTo

func MustGetRelativePathTo(absolutePath string, relativeTo string) (relativePath string)

func MustGetRelativePathsTo

func MustGetRelativePathsTo(absolutePaths []string, relativeTo string) (relativePaths []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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