Files
wazero/internal/platform/open_file.go
Achille 5cdf32062c wasi: support O_DIRECTORY and O_NOFOLLOW (#1093)
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
Co-authored-by: Takeshi Yoneda <takeshi@tetrate.io>
2023-02-07 12:43:59 +09:00

21 lines
405 B
Go

//go:build !windows && !js
package platform
import (
"io/fs"
"os"
"syscall"
)
// Simple aliases to constants in the syscall package for portability with
// platforms which do not have them (e.g. windows)
const (
O_DIRECTORY = syscall.O_DIRECTORY
O_NOFOLLOW = syscall.O_NOFOLLOW
)
func OpenFile(name string, flag int, perm fs.FileMode) (*os.File, error) {
return os.OpenFile(name, flag, perm)
}