...also, i have a parallel file walker that's 10x+ faster. https://github.com/MichaelTJones
On Wed, Jan 10, 2018 at 4:07 PM, Ian Lance Taylor <i...@golang.org> wrote: > On Wed, Jan 10, 2018 at 3:31 PM, Amandeep Gautam > <amandeepgaut...@gmail.com> wrote: > > > > Is there a equivalent of telldir in golang which can page reading of a > > directory. > > Just using filepath.walk would be inefficient for large file systems. > > There is no telldir, but you can simply call the `Readdir` (or > `Readdirnames`) method in a loop, each time passing in the number of > files you want to see. > > > > From one of the answers to this question > > https://stackoverflow.com/questions/39583522/how-do-i- > use-seekdir-telldir-in-golang > > > > it looks like there is nothing for this use case, which brings me to my > next > > question: Any ideas about how to go about dealing such use case. > > To be clear, that question, and maybe yours too, is about reading an > entire directory tree, not a single directory. telldir won't help you > there either. seekdir/telldir, like the `Readdir` loop, is only > helpful when reading a single directory. > > > And that said, why is filepath.Walk inefficient for a large file > system? It should do fine. > > What is the real problem? > > Ian > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Michael T. Jones michael.jo...@gmail.com -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.