[go-nuts] Re: Unexpected error from os.DirEntry on Win10

2021-03-12 Thread Brian Candler
On Thursday, 11 March 2021 at 20:31:24 UTC rob wrote: > As the subject line says, this is on windows. > I'm getting the file not found error for every file returned by the glob > function. > > I guess I misunderstood the purpose of ReadDir, and I really need to call > os.Lstat to retrieve the

[go-nuts] Re: Unexpected error from os.DirEntry on Win10

2021-03-11 Thread peterGo
rob. Function filepath.Glob returns the names of all files matching the pattern. The files may be directories, regular files, links, and so forth. Function os.ReadDir expects the name of a directory. If the name is not a directory, it returns an error. Your Glob pattern is "*.txt". It probably