File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -69,27 +69,7 @@ func (p *Path) ReadDir(filters ...ReadDirFilter) (PathList, error) {
6969// ReadDirRecursive returns a PathList containing the content of the directory
7070// and its subdirectories pointed by the current Path
7171func (p * Path ) ReadDirRecursive () (PathList , error ) {
72- infos , err := os .ReadDir (p .path )
73- if err != nil {
74- return nil , err
75- }
76- paths := PathList {}
77- for _ , info := range infos {
78- path := p .Join (info .Name ())
79- paths .Add (path )
80-
81- if isDir , err := path .IsDirCheck (); err != nil {
82- return nil , err
83- } else if isDir {
84- subPaths , err := path .ReadDirRecursive ()
85- if err != nil {
86- return nil , err
87- }
88- paths .AddAll (subPaths )
89- }
90-
91- }
92- return paths , nil
72+ return p .ReadDirRecursiveFiltered (nil )
9373}
9474
9575// ReadDirRecursiveFiltered returns a PathList containing the content of the directory
You can’t perform that action at this time.
0 commit comments