package mmap
import "golang.org/x/exp/mmap"
Package mmap provides a way to memory-map a file.
Index ¶
Types ¶
type ReaderAt ¶
type ReaderAt struct {
// contains filtered or unexported fields
}
ReaderAt reads a memory-mapped file.
Like any io.ReaderAt, clients can execute parallel ReadAt calls, but it is not safe to call Close and reading methods concurrently.
func Open ¶
Open memory-maps the named file for reading.
func (*ReaderAt) At ¶
At returns the byte at index i.
func (*ReaderAt) Close ¶
Close closes the reader.
func (*ReaderAt) Len ¶
Len returns the length of the underlying memory-mapped file.
func (*ReaderAt) ReadAt ¶
ReadAt implements the io.ReaderAt interface.
Source Files ¶
mmap_unix.go
- Version
- v0.0.0-20250218142911-aa4b98e5adaa (latest)
- Published
- Feb 18, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 2 days ago –
Tools for package owners.