filepath

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Overview

Package filepath implements Go's filepath package with explicit operating systems (and for some functions and explicit working directory). This allows tools built for one OS to operate on paths targeting another OS. For example, a Linux build can determine whether a path is absolute on Linux or on Windows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(os, path, cwd string) (_ string, err error)

Abs is a version of path/filepath's Abs with an explicit operating system and current working directory.

func Clean

func Clean(os, path string) string

Clean is an explicit-OS version of path/filepath's Clean.

func IsAbs

func IsAbs(os, path string) bool

IsAbs is a version of path/filepath's IsAbs with an explicit operating system.

func IsAncestor

func IsAncestor(os, pathA, pathB, cwd string) (_ bool, err error)

IsAncestor returns true when pathB is an strict ancestor of pathA, and false where the paths are equal or pathB is outside of pathA. Paths that are not absolute will be made absolute with Abs.

func Join

func Join(os string, elem ...string) string

Join is an explicit-OS version of path/filepath's Join.

func Separator

func Separator(os string) rune

Separator is an explicit-OS version of path/filepath's Separator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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