Re: [go-nuts] C's readdir equivalent

2017-10-19 Thread Bakul Shah
On Thu, 19 Oct 2017 09:29:09 -0700 Ian Lance Taylor wrote: Ian Lance Taylor writes: > On Wed, Oct 18, 2017 at 10:54 PM, Bakul Shah wrote: > > > > os.Readdirnames() just returns dir enry names[1], while > > os.Readdir() lstats all the dir entries. > > > >

Re: [go-nuts] C's readdir equivalent

2017-10-19 Thread Ian Lance Taylor
On Wed, Oct 18, 2017 at 10:54 PM, Bakul Shah wrote: > > os.Readdirnames() just returns dir enry names[1], while > os.Readdir() lstats all the dir entries. > > Pretty much every OS's (C lang) readdir() returns a direntry's > type without having to stat the underlying file.

[go-nuts] C's readdir equivalent

2017-10-18 Thread Bakul Shah
os.Readdirnames() just returns dir enry names[1], while os.Readdir() lstats all the dir entries. Pretty much every OS's (C lang) readdir() returns a direntry's type without having to stat the underlying file. More often than not this is all one wants -- not everyone wants to walk a directory