30
30
package paths
31
31
32
32
import (
33
- "io/ioutil "
33
+ "os "
34
34
"strings"
35
35
)
36
36
@@ -41,7 +41,7 @@ type ReadDirFilter func(file *Path) bool
41
41
// ReadDir returns a PathList containing the content of the directory
42
42
// pointed by the current Path. The resulting list is filtered by the given filters chained.
43
43
func (p * Path ) ReadDir (filters ... ReadDirFilter ) (PathList , error ) {
44
- infos , err := ioutil .ReadDir (p .path )
44
+ infos , err := os .ReadDir (p .path )
45
45
if err != nil {
46
46
return nil , err
47
47
}
@@ -69,7 +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 := ioutil .ReadDir (p .path )
72
+ infos , err := os .ReadDir (p .path )
73
73
if err != nil {
74
74
return nil , err
75
75
}
@@ -101,7 +101,7 @@ func (p *Path) ReadDirRecursive() (PathList, error) {
101
101
// - `filters` are the filters that are checked to determine if the entry should be
102
102
// added to the resulting PathList
103
103
func (p * Path ) ReadDirRecursiveFiltered (recursionFilter ReadDirFilter , filters ... ReadDirFilter ) (PathList , error ) {
104
- infos , err := ioutil .ReadDir (p .path )
104
+ infos , err := os .ReadDir (p .path )
105
105
if err != nil {
106
106
return nil , err
107
107
}
0 commit comments