path2

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2015 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const UNKNOWN rune = ' '

Variables

This section is empty.

Functions

func ExpandAbs

func ExpandAbs(path string) string

ExpandAbs expand path to absolute path

func ExpandHome

func ExpandHome(path string) string

ExpandHome expand ~ to user's home dir

func Home

func Home() string

Home return current user's Home dir

func IsRelative

func IsRelative(path string) bool

IsRelative check whether a path is relative In these condition: path is empty, start with '[.~][/\]', '/', "[a-z]:\"

func IsRoot

func IsRoot(path string) bool

IsRoot check wether or not path is root of filesystem

func IsWinRoot

func IsWinRoot(path string) bool

IsWinRoot check whether a path is windows absolute path with disk letter

func LastDir

func LastDir(path string) (string, error)

LastDir return last dir of path, if path is dir, return itself else return path's contain dir name

func ProgramDir

func ProgramDir() (string, error)

ProgramDir return dir of program use os.Args[0]

Types

This section is empty.

Jump to

Keyboard shortcuts

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