mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
os: implement readdir for darwin and linux
readdir is disabled on linux for 386 and arm until syscall.seek is implemented there. windows is hard, so leaving that for later. File src/os/dir_other_go115.go can be deleted when we drop support for go 1.15. Also adds TestReadNonDir, which was helpful while debugging.
This commit is contained in:
@@ -13,6 +13,17 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var dot = []string{
|
||||
"dir.go",
|
||||
"env.go",
|
||||
"errors.go",
|
||||
"file.go",
|
||||
"os_test.go",
|
||||
"types.go",
|
||||
"stat_darwin.go",
|
||||
"stat_linux.go",
|
||||
}
|
||||
|
||||
func randomName() string {
|
||||
// fastrand() does not seem available here, so fake it
|
||||
ns := time.Now().Nanosecond()
|
||||
|
||||
Reference in New Issue
Block a user