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
-14
View File
@@ -15,20 +15,6 @@ func (f *File) Sync() error {
return ErrNotImplemented
}
// Stat returns the FileInfo structure describing file.
// If there is an error, it will be of type *PathError.
func (f *File) Stat() (FileInfo, error) {
var fs fileStat
err := ignoringEINTR(func() error {
return syscall.Fstat(int(f.handle.(unixFileHandle)), &fs.sys)
})
if err != nil {
return nil, &PathError{Op: "fstat", Path: f.name, Err: err}
}
fillFileStatFromSys(&fs, f.name)
return &fs, nil
}
// statNolog stats a file with no test logging.
func statNolog(name string) (FileInfo, error) {
var fs fileStat