mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 21:43:40 +00:00
os: implement os.(*File).ReadDir for -target=wasi
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
This commit is contained in:
committed by
Ron Evans
parent
666312f63f
commit
ee3af40cab
@@ -267,6 +267,15 @@ func Pipe2(fds []int, flags int) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func Chmod(path string, mode uint32) (err error) {
|
||||
data := cstring(path)
|
||||
fail := int(libc_chmod(&data[0], mode))
|
||||
if fail < 0 {
|
||||
err = getErrno()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func closedir(dir uintptr) (err error) {
|
||||
e := libc_closedir(unsafe.Pointer(dir))
|
||||
if e != 0 {
|
||||
|
||||
Reference in New Issue
Block a user