| 1 |
package sys |
| 2 |
|
| 3 |
import ( |
| 4 |
"io/fs" |
| 5 |
|
| 6 |
"github.com/tetratelabs/wazero/sys" |
| 7 |
) |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
type UnimplementedFS struct{} |
| 12 |
|
| 13 |
|
| 14 |
func (UnimplementedFS) OpenFile(path string, flag Oflag, perm fs.FileMode) (File, Errno) { |
| 15 |
return nil, ENOSYS |
| 16 |
} |
| 17 |
|
| 18 |
|
| 19 |
func (UnimplementedFS) Lstat(path string) (sys.Stat_t, Errno) { |
| 20 |
return sys.Stat_t{}, ENOSYS |
| 21 |
} |
| 22 |
|
| 23 |
|
| 24 |
func (UnimplementedFS) Stat(path string) (sys.Stat_t, Errno) { |
| 25 |
return sys.Stat_t{}, ENOSYS |
| 26 |
} |
| 27 |
|
| 28 |
|
| 29 |
func (UnimplementedFS) Readlink(path string) (string, Errno) { |
| 30 |
return "", ENOSYS |
| 31 |
} |
| 32 |
|
| 33 |
|
| 34 |
func (UnimplementedFS) Mkdir(path string, perm fs.FileMode) Errno { |
| 35 |
return ENOSYS |
| 36 |
} |
| 37 |
|
| 38 |
|
| 39 |
func (UnimplementedFS) Chmod(path string, perm fs.FileMode) Errno { |
| 40 |
return ENOSYS |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
func (UnimplementedFS) Rename(from, to string) Errno { |
| 45 |
return ENOSYS |
| 46 |
} |
| 47 |
|
| 48 |
|
| 49 |
func (UnimplementedFS) Rmdir(path string) Errno { |
| 50 |
return ENOSYS |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
func (UnimplementedFS) Link(_, _ string) Errno { |
| 55 |
return ENOSYS |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
func (UnimplementedFS) Symlink(_, _ string) Errno { |
| 60 |
return ENOSYS |
| 61 |
} |
| 62 |
|
| 63 |
|
| 64 |
func (UnimplementedFS) Unlink(path string) Errno { |
| 65 |
return ENOSYS |
| 66 |
} |
| 67 |
|
| 68 |
|
| 69 |
func (UnimplementedFS) Utimens(path string, atim, mtim int64) Errno { |
| 70 |
return ENOSYS |
| 71 |
} |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
type UnimplementedFile struct{} |
| 78 |
|
| 79 |
|
| 80 |
func (UnimplementedFile) Dev() (uint64, Errno) { |
| 81 |
return 0, 0 |
| 82 |
} |
| 83 |
|
| 84 |
|
| 85 |
func (UnimplementedFile) Ino() (sys.Inode, Errno) { |
| 86 |
return 0, 0 |
| 87 |
} |
| 88 |
|
| 89 |
|
| 90 |
func (UnimplementedFile) IsDir() (bool, Errno) { |
| 91 |
return false, 0 |
| 92 |
} |
| 93 |
|
| 94 |
|
| 95 |
func (UnimplementedFile) IsAppend() bool { |
| 96 |
return false |
| 97 |
} |
| 98 |
|
| 99 |
|
| 100 |
func (UnimplementedFile) SetAppend(bool) Errno { |
| 101 |
return ENOSYS |
| 102 |
} |
| 103 |
|
| 104 |
|
| 105 |
func (UnimplementedFile) Stat() (sys.Stat_t, Errno) { |
| 106 |
return sys.Stat_t{}, ENOSYS |
| 107 |
} |
| 108 |
|
| 109 |
|
| 110 |
func (UnimplementedFile) Read([]byte) (int, Errno) { |
| 111 |
return 0, ENOSYS |
| 112 |
} |
| 113 |
|
| 114 |
|
| 115 |
func (UnimplementedFile) Pread([]byte, int64) (int, Errno) { |
| 116 |
return 0, ENOSYS |
| 117 |
} |
| 118 |
|
| 119 |
|
| 120 |
func (UnimplementedFile) Seek(int64, int) (int64, Errno) { |
| 121 |
return 0, ENOSYS |
| 122 |
} |
| 123 |
|
| 124 |
|
| 125 |
func (UnimplementedFile) Readdir(int) (dirents []Dirent, errno Errno) { |
| 126 |
return nil, ENOSYS |
| 127 |
} |
| 128 |
|
| 129 |
|
| 130 |
func (UnimplementedFile) Write([]byte) (int, Errno) { |
| 131 |
return 0, ENOSYS |
| 132 |
} |
| 133 |
|
| 134 |
|
| 135 |
func (UnimplementedFile) Pwrite([]byte, int64) (int, Errno) { |
| 136 |
return 0, ENOSYS |
| 137 |
} |
| 138 |
|
| 139 |
|
| 140 |
func (UnimplementedFile) Truncate(int64) Errno { |
| 141 |
return ENOSYS |
| 142 |
} |
| 143 |
|
| 144 |
|
| 145 |
func (UnimplementedFile) Sync() Errno { |
| 146 |
return 0 |
| 147 |
} |
| 148 |
|
| 149 |
|
| 150 |
func (UnimplementedFile) Datasync() Errno { |
| 151 |
return 0 |
| 152 |
} |
| 153 |
|
| 154 |
|
| 155 |
func (UnimplementedFile) Utimens(int64, int64) Errno { |
| 156 |
return ENOSYS |
| 157 |
} |
| 158 |
|
| 159 |
|
| 160 |
func (UnimplementedFile) Close() (errno Errno) { return } |