Read implements fs.NodeReader and supports incremental reads.
(_ context.Context, _ fs.FileHandle, dest []byte, off int64)
| 77 | |
| 78 | // Read implements fs.NodeReader and supports incremental reads. |
| 79 | func (*readme) Read(_ context.Context, _ fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) { |
| 80 | end := int(off) + len(dest) |
| 81 | if end > len(readmeText) { |
| 82 | end = len(readmeText) |
| 83 | } |
| 84 | return fuse.ReadResultData([]byte(readmeText[off:end])), fs.OK |
| 85 | } |
| 86 | |
| 87 | // Open implements fs.NodeOpener and supports opening the README as a read-only |
| 88 | // file. |
no outgoing calls