gpath

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTimeout = 2 * time.Second

Functions

func CopyDir

func CopyDir(src, dest string) error

CopyDir copy directory with its contents to destination

func CopyFile

func CopyFile(src, dest string) error

CopyFile copies file to destination

func IsDir

func IsDir(path string) bool

IsDir checks if path is a directory

func IsDirEmpty

func IsDirEmpty(path string) bool

IsDirEmpty checks if directory is empty

func IsDirExist

func IsDirExist(path string) bool

IsDirExist checks if is directory exist

func IsFileExist

func IsFileExist(path string) bool

IsFileExist checks if file exist

func MakePath

func MakePath(path string) error

MakePath create path recursive

func Open

func Open(path string) (*file, error)

Open opens a file

func Parent

func Parent(s string) string

Parent return root of path

func PathInfo

func PathInfo(path string) internalPathInfo

PathInfo return detailed information of a path

func RSlash

func RSlash(path string) string

RSlash trim right slash

func ReadFile

func ReadFile(path string) ([]byte, error)

ReadFile reads file to bytes

func Remove

func Remove(path string) error

Remove removes a path or file

func SafeFileContent

func SafeFileContent(path string) []byte

SafeFileContent return content of a file assumed is accessible

func Stat

func Stat(path string) *os.FileInfo

Stat return information about path

func SymLink(src, dest string) error

SymLink create SymLinks

func WorkingDir

func WorkingDir() string

WorkingDir return current working directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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