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
+8
View File
@@ -22,3 +22,11 @@ func Pipe() (r *File, w *File, err error) {
}
return
}
// ReadAt reads up to len(b) bytes from the File starting at the given absolute offset.
// It returns the number of bytes read and any error encountered, possibly io.EOF.
// At end of file, Pread returns 0, io.EOF.
// TODO: move to file_anyos once ReadAt is implemented for windows
func (f unixFileHandle) ReadAt(b []byte, offset int64) (n int, err error) {
return -1, ErrNotImplemented
}