MCPcopy
hub / github.com/perkeep/perkeep / numRegularFilesUnder

Function numRegularFilesUnder

internal/osutil/paths.go:119–130  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

117}
118
119func numRegularFilesUnder(dir string) (n int, err error) {
120 err = filepath.Walk(dir, func(path string, fi os.FileInfo, err error) error {
121 if err != nil {
122 return err
123 }
124 if fi != nil && fi.Mode().IsRegular() {
125 n++
126 }
127 return nil
128 })
129 return n, err
130}
131
132func camliVarDirOf(name string) string {
133 if d := os.Getenv("CAMLI_VAR_DIR"); d != "" {

Callers 2

CamliVarDirFunction · 0.85
perkeepConfigDirFunction · 0.85

Calls 2

ModeMethod · 0.80
WalkMethod · 0.45

Tested by

no test coverage detected