Documentation ¶
Overview ¶
Package fs support facilitate for handler file and direction.
Index ¶
- Constants
- func AddEnvPath(paths ...string) error
- func Append(filename, text string) error
- func CheckDir(dir 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 IsDir(dir string) bool
- func Put(filename, text string) error
- func StdDir(d string) string
- func StdPathName(vPath string) string
- type ChildDirData
- type DirScanner
- type FsReaderWriter
- type MemUsage
Constants ¶
View Source
const (
DirScannerChanMax = 5000
)
View Source
const (
VEnvPath = "path"
)
Variables ¶
This section is empty.
Functions ¶
func CheckDir ¶ added in v0.2.1
CheckDir checkout if dir exist, when not exist will try to build it and return the path.
func DelEnvPath ¶ added in v0.3.0
DelEnvPath del the path from env path list.
func GetMemStatsRange ¶ added in v1.1.0
GetMemStatsRange get memory stats range callback
func StdPathName ¶ added in v0.5.1
StdPathName the standard path format
Types ¶
type ChildDirData ¶ added in v1.1.0
type DirScanner ¶ added in v1.1.0
type DirScanner struct { AllItem int AllDirItem int AllFileItem int AllSize int64 TopChildDick map[string]ChildDirData Runtime time.Duration CddChanMax int // [Experimental] // contains filtered or unexported fields }
DirScanner the tool to scan the dirs.
func NewDirScanner ¶ added in v1.1.0
func NewDirScanner(vDir string) *DirScanner
func (*DirScanner) BaseDir ¶ added in v1.1.0
func (ds *DirScanner) BaseDir() string
func (*DirScanner) ChanNumber ¶ added in v1.1.0
func (ds *DirScanner) ChanNumber() int
func (*DirScanner) Exclude ¶ added in v1.1.0
func (ds *DirScanner) Exclude(excludes ...string) *DirScanner
Exclude exclude exp for dir scan
func (*DirScanner) Include ¶ added in v1.1.0
func (ds *DirScanner) Include(includes ...string) *DirScanner
Include exclude exp for dir scan
func (*DirScanner) Scan ¶ added in v1.1.0
func (ds *DirScanner) Scan() error
Scan to star scan the dir.
func (*DirScanner) ScanParallel ¶ added in v1.1.0
func (ds *DirScanner) ScanParallel() error
ScanParallel to star scan the dir.[Experimental]
type FsReaderWriter ¶
type FsReaderWriter struct {
// contains filtered or unexported fields
}
FsReaderWriter [Experimental] file read interface
func (*FsReaderWriter) Error ¶
func (f *FsReaderWriter) Error() string
Click to show internal directories.
Click to hide internal directories.