Closed Juneezee closed 2 years ago
os.ReadDir is a more efficient implementation than ioutil.ReadDir as stated here https://pkg.go.dev/io/ioutil#ReadDir.
os.ReadDir
ioutil.ReadDir
Note: os.ReadDir was added in Go 1.16 as part of the deprecation of ioutil package. You can read the proposal here https://github.com/golang/go/issues/41467
ioutil
os.ReadDir
is a more efficient implementation thanioutil.ReadDir
as stated here https://pkg.go.dev/io/ioutil#ReadDir.Note:
os.ReadDir
was added in Go 1.16 as part of the deprecation ofioutil
package. You can read the proposal here https://github.com/golang/go/issues/41467