os, syscall: implement ReadAt for unix

Windows will take more work, so test is skipped there.
This commit is contained in:
Dan Kegel
2021-11-20 11:43:52 -08:00
committed by Ron Evans
parent 47db50b273
commit f79f6b0e62
7 changed files with 102 additions and 3 deletions
+3
View File
@@ -46,6 +46,9 @@ type FileHandle interface {
// Read reads up to len(b) bytes from the file.
Read(b []byte) (n int, err error)
// 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)
// Write writes up to len(b) bytes to the file.
Write(b []byte) (n int, err error)