Documentation ¶
Index ¶
Constants ¶
View Source
const ( FileIOType = iota + 1 // Standard File IO BufIOType // File IO with buffer MmapIOType // Memory Mapping IO )
View Source
const DataFilePerm = 0644
0644 Indicates that a file is created. The file owner can read and write the file, but others can only read the file
View Source
const DefaultFileSize = 256 * 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bufio ¶
type Bufio struct {
// contains filtered or unexported fields
}
Bufio File IO with buffer
type FileIO ¶
type FileIO struct {
// contains filtered or unexported fields
}
FileIO represents the standard system file I/O.
func NewFileIOManager ¶
NewFileIOManager initializes the standard file I/O manager.
type IOManager ¶
type IOManager interface { // Read reads the corresponding data from the file at the given position. Read([]byte, int64) (int, error) // Write writes a byte array to the file. Write([]byte) (int, error) // Sync persists data. Sync() error // Close closes the file. Close() error // Size gets the file size. Size() (int64, error) }
IOManager is an abstract IO management interface that can accommodate different IO types. Currently, it supports standard file IO.
Click to show internal directories.
Click to hide internal directories.