Documentation ¶
Overview ¶
Package fs support facilitate for handler file and direction.
Index ¶
- Constants
- func AddEnvPath(paths ...string) error
- func AppName() string
- func Append(filename, text string) error
- func CheckDir(dir string) string
- func CheckFileDir(filename string) string
- func Copy(dstFile, srcFile string) (bool, error)
- func CopyDir(dst, src string)
- func DelEnvPath(paths ...string) error
- func EnvPath() []string
- func ExistPath(vPath string) bool
- func GetMemStatsRange() func() (runtime.MemStats, runtime.MemStats)
- func InsToFilename(filename, ins string) string
- func InsToFilenameDetect(filename, ins string) string
- func IsDir(dir string) bool
- func Put(filename, text string) error
- func RemoveList(files []string) string
- func RootFile() string
- func RootPath(joins ...string) string
- func Split(vPath string) (baseDir, file, name string)
- func StdDir(d string) string
- func StdPathName(vPath string) string
- type MemUsage
Constants ¶
const (
VEnvPath = "path"
)
Variables ¶
This section is empty.
Functions ¶
func CheckDir ¶
CheckDir checkout if dir exist, when not exist will try to build it and return the path.
func CheckFileDir ¶
CheckFileDir detect whether the parent directory where the file is located exists, and use it to automatically generate the parent directory when generating files (adaptable)
func DelEnvPath ¶
DelEnvPath del the path from env path list.
func GetMemStatsRange ¶
GetMemStatsRange get memory stats range callback
func InsToFilename ¶
InsToFilename Insert the name after the file name and before the suffix,
E.G `$s => /test/pathx/name-eg.docx` into `/test/pathx/name-eg{$s}.docx`
func InsToFilenameDetect ¶
InsToFilenameDetect tentatively obtaining the additional name of the inserted file
e.g.
`-custom => /test/pathx/name-eg.docx` into `/test/pathx/name-eg-custom.docx`
`custom.docx => /test/pathx/name-eg.docx` into `/test/pathx/custom.docx`
`/new/x/custom.docx => /test/pathx/name-eg.docx` into `/new/x/custom.docx`