files

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(path string)

Delete removes a file or directory from disk.

func Dir

func Dir(fullPath string) string

Dir retrieves the Directory path of the passed in full path.

func GetWd

func GetWd() string

GetWd is used to get the current directory. If any error raises, application will exist.

func IsAbsolutePath

func IsAbsolutePath(path string) bool

IsAbsolutePath is used to judge whether a given path is a absolute path. The logic is simple, if a path is start with '/', then it is a absolute path.

func IsDir

func IsDir(path string) bool

IsDir is used to assert whether the path is a directory or not.

func IsExist

func IsExist(path string) bool

IsExist is used to assert whether a file or directory in the path exists or not.

func Mkdir

func Mkdir(path string) error

Mkdir create a directry.

func Move

func Move(src, dir string)

Move is used to move a file or directory from a absolute path to another. If the file name differs, it can also act as changing filename.

func Name

func Name(path string) string

Name is used to retrieve the basename of the file or directory of the given path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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