fspath

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPath = errors.New("invalid path")

Functions

func IsLocal

func IsLocal(file string) bool

IsLocal returns true if the file is a local file.

The file must be a fs.FS formatted path with '/' as the separator.

func MustToRel

func MustToRel(file string) string

MustToRel is like RelAbs but panics if there is an error.

func ToRel

func ToRel(file string) (string, error)

ToRel converts a path to an absolute path for use in a fs.FS filesystem. This means any volume name and leading separator are stripped off, and any relative path is converted to an absolute path.

The file must be a fs.FS formatted path with '/' as the separator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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