...
1 package fsapi
2
3 import experimentalsys "github.com/tetratelabs/wazero/experimental/sys"
4
5 func Adapt(f experimentalsys.File) File {
6 if f, ok := f.(File); ok {
7 return f
8 }
9 return unimplementedFile{f}
10 }
11
12 type unimplementedFile struct{ experimentalsys.File }
13
14
15 func (unimplementedFile) IsNonblock() bool {
16 return false
17 }
18
19
20 func (unimplementedFile) SetNonblock(bool) experimentalsys.Errno {
21 return experimentalsys.ENOSYS
22 }
23
24
25 func (unimplementedFile) Poll(Pflag, int32) (ready bool, errno experimentalsys.Errno) {
26 return false, experimentalsys.ENOSYS
27 }
28
View as plain text