2 ms·
There are more optimizations than that that you could probably use if you want fast ReadDir. Golang's ReadDir reads directory entries, stats all files, and sor
by Scaevolus 8y ago
There are more optimizations than that that you could probably use if you want fast ReadDir.
Golang's ReadDir reads directory entries, stats all files, and sorts the list. If all you want is the directory entries directly, try godirwalk (also much faster for walking!): https://godoc.org/github.com/karrick/godirwalk#ReadDirents https://godoc.org/github.com/karrick/godirwalk#ReadDirents