File tree 1 file changed +1
-21
lines changed
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) {
69
69
// ReadDirRecursive returns a PathList containing the content of the directory
70
70
// and its subdirectories pointed by the current Path
71
71
func (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 )
93
73
}
94
74
95
75
// ReadDirRecursiveFiltered returns a PathList containing the content of the directory
You can’t perform that action at this time.
0 commit comments