What I forgot: the error is nil. So updated test code:
| package main
|
| import (
| "fmt"
| "io/fs"
| "os"
| )
|
| func main() {
| fsys := os.DirFS(os.Args[1])
| entries, err := fs.ReadDir(fsys, ".")
| count := 0
| for _, entry := range entries {
| info, _ := entry.Info()
| fmt.Println(info.Name(), info.IsDir())
| count += 1
| }
| fmt.Println("found without '.' and '..':", count, ", Error:", err)
| }
And it ends with:
| found without '.' and '..': 46 , Error: <nil>
Bastian
--
There is an order of things in this universe.
-- Apollo, "Who Mourns for Adonais?" stardate 3468.1