mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
up
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
package gfile
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gogf/gf/errors/gerror"
|
||||
"github.com/gogf/gf/text/gstr"
|
||||
"os"
|
||||
@ -104,6 +105,7 @@ func ScanDirFile(path string, pattern string, recursive ...bool) ([]string, erro
|
||||
// the <path> and its sub-folders. It ignores the sub-file path if <handler> returns an empty
|
||||
// string, or else it appends the sub-file path to result slice.
|
||||
func doScanDir(depth int, path string, pattern string, recursive bool, handler func(path string) string) ([]string, error) {
|
||||
fmt.Println("doScanDir:", path)
|
||||
if depth >= gMAX_SCAN_DEPTH {
|
||||
return nil, gerror.Newf("directory scanning exceeds max recursive depth: %d", gMAX_SCAN_DEPTH)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user