pathutil

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHomeDir added in v0.0.7

func GetHomeDir() string

func IsSubPath

func IsSubPath(basePath, subPath string) (string, bool)

IsSubPath checks if the extending path is an extension of the basePath, it will return the extending path elements. Both paths have to be absolute or have the same root directory. The remaining path elements

func ReplaceBase

func ReplaceBase(path, old, replacement string) (string, error)

ReplaceBase will return a replacement path with replacement as a base of the path instead of the old base. a/b/c, a, d -> d/b/c

Types

This section is empty.

Jump to

Keyboard shortcuts

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