paths

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TauPath directory where all processing is done
	TauPath = ".tau"

	// CachePath is path where tau will store cache items
	CachePath = ".tau_cache"
)

Variables

View Source
var (
	// WorkingDir is directory where user is running command from
	WorkingDir string
)

Functions

func Abs

func Abs(pwd, path string) string

Abs returns the absolute path for file, based on

func EnsureDirectoryExists

func EnsureDirectoryExists(path string)

EnsureDirectoryExists makes sure the entire path exists, all parent folders too.

func IsDir

func IsDir(path string) bool

IsDir returns true if path is a directory, will fail otherwise

func IsFile

func IsFile(path string) bool

IsFile will return true if path is a file

func Join

func Join(path ...string) string

Join the paths in arguments together and returned the concated path. If any element is empty or "." it will replace that with "root", just to ensure it is a valid pathname. If first element is empty or not absolute path it will prepend the working directory to path.

func JoinAndCreate

func JoinAndCreate(path ...string) string

JoinAndCreate joins the paths together and makes sure the path exists

func Remove

func Remove(path string)

Remove the directory and all its subdirectories

Types

This section is empty.

Jump to

Keyboard shortcuts

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