Kludge: work around lack of syscall.seek on 386 and arm, #1906

Revert this once syscall.seek is implemented
cf. https://github.com/tinygo-org/tinygo/issues/1906
This commit is contained in:
Dan Kegel
2022-01-18 01:03:34 +00:00
committed by Ron Evans
parent 322abf6d22
commit 60b483bd3b
5 changed files with 84 additions and 27 deletions
-13
View File
@@ -180,19 +180,6 @@ func (f *File) Readdirnames(n int) (names []string, err error) {
return nil, &PathError{"readdirnames", f.name, ErrNotImplemented}
}
// Seek sets the offset for the next Read or Write on file to offset, interpreted
// according to whence: 0 means relative to the origin of the file, 1 means
// relative to the current offset, and 2 means relative to the end.
// It returns the new offset and an error, if any.
// The behavior of Seek on a file opened with O_APPEND is not specified.
//
// If f is a directory, the behavior of Seek varies by operating
// system; you can seek to the beginning of the directory on Unix-like
// operating systems, but not on Windows.
func (f *File) Seek(offset int64, whence int) (ret int64, err error) {
return f.handle.Seek(offset, whence)
}
func (f *File) SyscallConn() (syscall.RawConn, error) {
return nil, ErrNotImplemented
}