Add a stub for os.ReadDir()

This is needed by crypto/x509 in some configuration.
Related to #1888.
This commit is contained in:
Federico G. Schwindt
2021-05-19 13:30:32 +01:00
committed by Ron Evans
parent b20905da13
commit a38b5c4e01
+4
View File
@@ -17,6 +17,10 @@ func (f *File) ReadDir(n int) ([]DirEntry, error) {
return nil, &PathError{"ReadDir", f.name, ErrNotImplemented}
}
func ReadDir(name string) ([]DirEntry, error) {
return nil, &PathError{"ReadDir", name, ErrNotImplemented}
}
// The followings are copied from Go 1.16 official implementation:
// https://github.com/golang/go/blob/go1.16/src/os/file.go