scandir

scandir

[code=golang]
items, _ := ioutil.ReadDir(".") // []fs.FileInfo
for _, item := range items {
    // item = fs.FileInfo
    // Unlike scandir() in php, ioutil.ReadDir() in GoLang does not return "." (current directory) and ".." (parent directory).
}
[/code]