Versions in this module Expand all Collapse all v0 v0.0.1 Aug 11, 2022 Changes in this version + func NewMMapDirectory(rootPath string) (*mmapDirectory, error) + func NewMemoryDirectory() *memoryDirectory + type DataReader struct + func (d *DataReader) Read(p []byte) (n int, err error) + type Directory interface + AtomicRead func(path string) ([]byte, error) + AtomicWrite func(path string, data []byte) error + Exists func(path string) (bool, error) + OpenRead func(path string) (*FileSlice, error) + OpenWrite func(path string) (WriteCloseSyncer, error) + type FileHandle interface + Len func() int + type FileSlice struct + func NewFileSlice(data FileHandle, closer func() error) *FileSlice + func (f *FileSlice) Close() error + func (f *FileSlice) Len() int + func (f *FileSlice) Read(from, to int) ([]byte, error) + func (f *FileSlice) Reader() *DataReader + func (f *FileSlice) Slice(from, to int) *FileSlice + type ManagedDirectory struct + MetaInformation *MetaInformation + func NewManagedDirectory(dir Directory) (*ManagedDirectory, error) + func (m *ManagedDirectory) AtomicRead(path string) ([]byte, error) + func (m *ManagedDirectory) AtomicWrite(path string, data []byte) error + func (m *ManagedDirectory) Exists(path string) (bool, error) + func (m *ManagedDirectory) OpenRead(path string) (*FileSlice, error) + func (m *ManagedDirectory) OpenWrite(path string) (WriteCloseSyncer, error) + type MetaInformation struct + ManagedPaths []string + func (m *MetaInformation) AddPath(path string) (added bool) + func (m *MetaInformation) RemovePath(path string) + type WriteCloseSyncer interface + Sync func() error