I don't understand why you opened a new thread. But FWIW, it would still be
useful to know
a) what the actual contents of the directory are you are globbing
b) which of those file names is then giving you an error
c) and which specific call is returning that error.

Your message "Unexpected error from os.DirEntry" is confusing, as the only
method of os.DirEntry that could return an error, hardcodes that error to
be nil, as far as I can tell:
https://github.com/golang/go/blob/b3896fc331c36a539f825f1f656cef3f9cdffd3f/src/os/dir_windows.go#L68

In the other thread, I also tried to provide a plausible explanation from
the limited info - it seems strange that you are globbing for *.txt files
and then call ReadDir with those filenames. Have you read that message?

On Thu, Mar 11, 2021 at 9:31 PM rob <drrob...@fastmail.com> 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 directory information for each individual file
> that matches the glob pattern on widows 10.
>
> I'll check,  but I'm able to call os.ReadDir on an individual file on
> Ubuntu 20.04.  I'll confirm when I get home that I'm getting a FileInfo
> structure returned from this routine
>
>
>
> --
>   rob
>   drrob...@fastmail.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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/137cb626-90f1-455e-b0aa-7a6d476e3813%40www.fastmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAEkBMfF3M%3DVJOFMYVzwfZf8Yv7gtcLv2b10sc_xozF6WXiwz9A%40mail.gmail.com.

Reply via email to