gpath

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(path string) string

Abs get file absolute path

func Basename

func Basename(path string) string

Basename get filename

func CleanPath

func CleanPath(p string) string

func Dirname

func Dirname(path string) string

Dirname get file dir name

func Exist

func Exist(path string) bool

Exist judge whether exists filepath

func FileNameWithoutExt

func FileNameWithoutExt(filename string) string

func FileSize

func FileSize(path string) int64

FileSize obtain file size

func Format

func Format(path string) string

Format the path

func GenUniqueFilename

func GenUniqueFilename(filename string, tries int, rule func(name string) string) (string, error)

func IsDir

func IsDir(path string) bool

IsDir judge whether is a dir

func IsFile

func IsFile(path string) bool

IsFile judge whether is a file

func Join

func Join(elem ...string) string

Join the path

func MkParentDir

func MkParentDir(path string)

MkParentDir create a path's parent dir

func Mkdir

func Mkdir(path string)

Mkdir create a folder

func Rel

func Rel(basepath, targpath string) (string, error)

func Remove

func Remove(path string)

Remove file or folder

func RemoveFile

func RemoveFile(path string)

RemoveFile remove a file

func Rename

func Rename(src, dst string) error

func RootPath

func RootPath() string

func RootPathExec

func RootPathExec() string

func Split

func Split(path string) (string, string)

Split get file dir name

func Suffix

func Suffix(path string) string

Suffix get file suffix

Types

This section is empty.

Jump to

Keyboard shortcuts

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