spf13 / afero

A FileSystem Abstraction System for Go
Apache License 2.0
5.8k stars 498 forks source link

what's the fastest way to count the number of files in a large directory? #360

Open lazy-gopher opened 2 years ago

lazy-gopher commented 2 years ago

I have a very large directory and slows to a halt when performing an ls. I wanted to know what's the fastest and most cost efficient way to count the number of items in a directory with afero.