3 ms·
There's https://golang.org/pkg/os/#File.Readdir https://golang.org/pkg/os/#File.Readdir
by icholy 6y ago
There's https://golang.org/pkg/os/#File.Readdir https://golang.org/pkg/os/#File.Readdir
- Someone 6y agoWhich, as far as I can tell (couldn’t find opendir/closedir), has the same problem. I think they named the call after the posix one. If so, they must have known about opendir/closedir.
- icholy 6y agoIt uses https://golang.org/pkg/syscall/#ReadDirent https://golang.org/pkg/syscall/#ReadDirent and https://golang.org/pkg/syscall/#ParseDirent https://golang.org/pkg/syscall/#ParseDirent to incrementally read them.