mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
os: implement file.Seek, add smoke test
This commit is contained in:
@@ -66,6 +66,12 @@ func (f unixFileHandle) ReadAt(b []byte, offset int64) (n int, err error) {
|
||||
return -1, ErrNotImplemented
|
||||
}
|
||||
|
||||
// Seek wraps syscall.Seek.
|
||||
func (f unixFileHandle) Seek(offset int64, whence int) (int64, error) {
|
||||
newoffset, err := syscall.Seek(syscallFd(f), offset, whence)
|
||||
return newoffset, handleSyscallError(err)
|
||||
}
|
||||
|
||||
// isWindowsNulName reports whether name is os.DevNull ('NUL') on Windows.
|
||||
// True is returned if name is 'NUL' whatever the case.
|
||||
func isWindowsNulName(name string) bool {
|
||||
|
||||
Reference in New Issue
Block a user