(b []byte)
| 354 | func (f *openFile) Stat() (fs.FileInfo, error) { return f.f, nil } |
| 355 | |
| 356 | func (f *openFile) Read(b []byte) (int, error) { |
| 357 | if f.offset >= int64(len(f.f.data)) { |
| 358 | return 0, io.EOF |
| 359 | } |
| 360 | if f.offset < 0 { |
| 361 | return 0, &fs.PathError{Op: "read", Path: f.f.name, Err: fs.ErrInvalid} |
| 362 | } |
| 363 | n := copy(b, f.f.data[f.offset:]) |
| 364 | f.offset += int64(n) |
| 365 | return n, nil |
| 366 | } |
| 367 | |
| 368 | func (f *openFile) Seek(offset int64, whence int) (int64, error) { |
| 369 | switch whence { |
nothing calls this directly
no outgoing calls
no test coverage detected