1
- package fsapi
1
+ package sys
2
2
3
3
import (
4
4
"fmt"
5
5
"io/fs"
6
6
7
- experimentalsys "github.com/tetratelabs/wazero/experimental/sys"
8
7
"github.com/tetratelabs/wazero/sys"
9
8
)
10
9
@@ -21,7 +20,7 @@ type FileType = fs.FileMode
21
20
// - This extends `dirent` defined in POSIX with some fields defined by
22
21
// Linux. See https://man7.org/linux/man-pages/man3/readdir.3.html and
23
22
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html
24
- // - This has a subset of fields defined in Stat_t. Notably, there is no
23
+ // - This has a subset of fields defined in sys. Stat_t. Notably, there is no
25
24
// field corresponding to Stat_t.Dev because that value will be constant
26
25
// for all files in a directory. To get the Dev value, call File.Stat on
27
26
// the directory File.Readdir was called on.
@@ -58,8 +57,8 @@ func (DirFile) IsAppend() bool {
58
57
}
59
58
60
59
// SetAppend implements File.SetAppend
61
- func (DirFile ) SetAppend (bool ) experimentalsys. Errno {
62
- return experimentalsys . EISDIR
60
+ func (DirFile ) SetAppend (bool ) Errno {
61
+ return EISDIR
63
62
}
64
63
65
64
// IsNonblock implements File.IsNonblock
@@ -68,41 +67,41 @@ func (DirFile) IsNonblock() bool {
68
67
}
69
68
70
69
// SetNonblock implements File.SetNonblock
71
- func (DirFile ) SetNonblock (bool ) experimentalsys. Errno {
72
- return experimentalsys . EISDIR
70
+ func (DirFile ) SetNonblock (bool ) Errno {
71
+ return EISDIR
73
72
}
74
73
75
74
// IsDir implements File.IsDir
76
- func (DirFile ) IsDir () (bool , experimentalsys. Errno ) {
75
+ func (DirFile ) IsDir () (bool , Errno ) {
77
76
return true , 0
78
77
}
79
78
80
79
// Read implements File.Read
81
- func (DirFile ) Read ([]byte ) (int , experimentalsys. Errno ) {
82
- return 0 , experimentalsys . EISDIR
80
+ func (DirFile ) Read ([]byte ) (int , Errno ) {
81
+ return 0 , EISDIR
83
82
}
84
83
85
84
// Pread implements File.Pread
86
- func (DirFile ) Pread ([]byte , int64 ) (int , experimentalsys. Errno ) {
87
- return 0 , experimentalsys . EISDIR
85
+ func (DirFile ) Pread ([]byte , int64 ) (int , Errno ) {
86
+ return 0 , EISDIR
88
87
}
89
88
90
89
// Poll implements File.Poll
91
- func (DirFile ) Poll (Pflag , int32 ) (ready bool , errno experimentalsys. Errno ) {
92
- return false , experimentalsys . ENOSYS
90
+ func (DirFile ) Poll (Pflag , int32 ) (ready bool , errno Errno ) {
91
+ return false , ENOSYS
93
92
}
94
93
95
94
// Write implements File.Write
96
- func (DirFile ) Write ([]byte ) (int , experimentalsys. Errno ) {
97
- return 0 , experimentalsys . EISDIR
95
+ func (DirFile ) Write ([]byte ) (int , Errno ) {
96
+ return 0 , EISDIR
98
97
}
99
98
100
99
// Pwrite implements File.Pwrite
101
- func (DirFile ) Pwrite ([]byte , int64 ) (int , experimentalsys. Errno ) {
102
- return 0 , experimentalsys . EISDIR
100
+ func (DirFile ) Pwrite ([]byte , int64 ) (int , Errno ) {
101
+ return 0 , EISDIR
103
102
}
104
103
105
104
// Truncate implements File.Truncate
106
- func (DirFile ) Truncate (int64 ) experimentalsys. Errno {
107
- return experimentalsys . EISDIR
105
+ func (DirFile ) Truncate (int64 ) Errno {
106
+ return EISDIR
108
107
}
0 commit comments