pathutil

package
v1.0.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

This package contains some path-relevant utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

Exists returns true only if path exists and is accessible.

func IsInsideDir

func IsInsideDir(path string, directory string) (isInside bool, err error)

IsInsideDir checks if path is within directory. Both path and directory have to be absolute paths.

func Rel

func Rel(base string, path string, cwd string) (relativePath string, err error)

Rel, like path.Rel, converts a path into a relative path to directory with the knowledge of cwd. Cwd, which should be an absolute path, will be used if either base or path is a relative paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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