os: implement file.Seek, add smoke test

This commit is contained in:
Dan Kegel
2022-01-01 07:51:31 -08:00
committed by Ron Evans
parent 84279ab2ec
commit 998f01608c
7 changed files with 91 additions and 5 deletions
+3
View File
@@ -49,6 +49,9 @@ type FileHandle interface {
// ReadAt reads up to len(b) bytes from the file starting at the given absolute offset
ReadAt(b []byte, offset int64) (n int, err error)
// Seek resets the file pointer relative to start, current position, or end
Seek(offset int64, whence int) (newoffset int64, err error)
// Write writes up to len(b) bytes to the file.
Write(b []byte) (n int, err error)