Documentation
¶
Index ¶
- func NewMMapDirectory(rootPath string) (*mmapDirectory, error)
- func NewMemoryDirectory() *memoryDirectory
- type DataReader
- type Directory
- type FileHandle
- type FileSlice
- type ManagedDirectory
- 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
- type WriteCloseSyncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMMapDirectory ¶
func NewMemoryDirectory ¶
func NewMemoryDirectory() *memoryDirectory
Types ¶
type DataReader ¶
type DataReader struct {
// contains filtered or unexported fields
}
type FileHandle ¶
type FileSlice ¶
type FileSlice struct {
// contains filtered or unexported fields
}
func NewFileSlice ¶
func NewFileSlice(data FileHandle, closer func() error) *FileSlice
func (*FileSlice) Close ¶
Close closes data file Close must be called only for the top level file slice, and must not for the child sliced one.
func (*FileSlice) Reader ¶
func (f *FileSlice) Reader() *DataReader
type ManagedDirectory ¶
type ManagedDirectory struct { MetaInformation *MetaInformation // contains filtered or unexported fields }
func NewManagedDirectory ¶
func NewManagedDirectory(dir Directory) (*ManagedDirectory, error)
func (*ManagedDirectory) AtomicRead ¶
func (m *ManagedDirectory) AtomicRead(path string) ([]byte, error)
func (*ManagedDirectory) AtomicWrite ¶
func (m *ManagedDirectory) AtomicWrite(path string, data []byte) error
func (*ManagedDirectory) OpenRead ¶
func (m *ManagedDirectory) OpenRead(path string) (*FileSlice, error)
func (*ManagedDirectory) OpenWrite ¶
func (m *ManagedDirectory) OpenWrite(path string) (WriteCloseSyncer, error)
type MetaInformation ¶
func (*MetaInformation) AddPath ¶
func (m *MetaInformation) AddPath(path string) (added bool)
func (*MetaInformation) RemovePath ¶
func (m *MetaInformation) RemovePath(path string)
type WriteCloseSyncer ¶
type WriteCloseSyncer interface { io.WriteCloser Sync() error }
Click to show internal directories.
Click to hide internal directories.