Documentation ¶
Index ¶
- func GetCurrentExecPath() (string, error)
- func GetCurrentFilePath() (string, error)
- func Mkdir(path string) error
- func Path2WebPath(path string) string
- func PathExists(path string) (bool, error)
- func PathExistsFast(path string) bool
- func PathFileList(path string) []string
- func PathFolderList(path string) []string
- func PathIsDir(path string) bool
- func PathIsFile(path string) bool
- func PathJoin(elem ...string) string
- func PathParent(path string) string
- func ReadFileAsByte(path string) ([]byte, error)
- func ReadFileAsJson(path string, v interface{}) error
- func RmDir(path string, force bool) error
- func RmDirForce(path string) error
- func WalkAllByGlob(path string, glob string, ignoreFolder bool) ([]string, error)
- func WalkAllByMatchPath(path string, pattern string, ignoreFolder bool) ([]string, error)
- func WalkAllFileBySuffix(path string, suffix string) ([]string, error)
- func WriteFileAsJson(path string, v interface{}, fileMod fs.FileMode, coverage, beauty bool) error
- func WriteFileAsJsonBeauty(path string, v interface{}, coverage bool) error
- func WriteFileByByte(path string, data []byte, fileMod fs.FileMode, coverage bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentExecPath ¶
GetCurrentExecPath get exec path
func Path2WebPath ¶ added in v1.5.0
Path2WebPath local path to web path will move prefix filepath.Separator
func ReadFileAsByte ¶
ReadFileAsByte read file as byte array
func ReadFileAsJson ¶
ReadFileAsJson read file as json
func WalkAllByGlob ¶
WalkAllByGlob can walk all path then return as list, by glob with filepath.Glob
func WalkAllByMatchPath ¶
WalkAllByMatchPath can walk all path then return as list, by under path pattern
func WalkAllFileBySuffix ¶
WalkAllFileBySuffix can walk all file then return all files as list, by file suffix
func WriteFileAsJson ¶
WriteFileAsJson write json file path most use Abs Path v data fileMod os.FileMode(0666) or os.FileMode(0644) coverage true will coverage old beauty will format json when write
func WriteFileAsJsonBeauty ¶
WriteFileAsJsonBeauty write json file as 0666 and beauty
Types ¶
This section is empty.