Files
wazero/internal/sysfs/syscall.go
Crypt Keeper 2a584a8937 fs: renames internal syscallfs package to sysfs and notes RATIONALE (#1056)
It will help for us to rename earlier vs later, and syscallfs will be
laborious, especially after we introduce an FSConfig type and need to
declare a method name that differentiates from normal fs.FS. e.g. WithFS
vs WithSysFS reads nicer than WithSyscallFS, and meanwhile sys is
already a public package.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-01-23 11:11:35 +08:00

29 lines
396 B
Go

//go:build !windows
package sysfs
import "syscall"
func adjustMkdirError(err error) error {
return err
}
func adjustRmdirError(err error) error {
return err
}
func adjustUnlinkError(err error) error {
if err == syscall.EPERM {
return syscall.EISDIR
}
return err
}
func rename(old, new string) error {
return syscall.Rename(old, new)
}
func maybeWrapFile(f file) file {
return f
}