Documentation ¶
Index ¶
- type MmapFile
- func (mf *MmapFile) Close() error
- func (mf *MmapFile) Read(data []byte) (int, error)
- func (mf *MmapFile) ReadAt(data []byte, offset int64) (int, error)
- func (mf *MmapFile) Seek(offset int64, whence int) (ret int64, err error)
- func (mf *MmapFile) Size() int64
- func (mf *MmapFile) Sync() error
- func (mf *MmapFile) Truncate(size int64) error
- func (mf *MmapFile) Write(data []byte) (int, error)
- func (mf *MmapFile) WriteAt(data []byte, offset int64) (int, error)
- type NormalFile
- type WalFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MmapFile ¶
type MmapFile struct {
// contains filtered or unexported fields
}
MmapFile 内存映射式文件操作,不支持并发操作
func OpenMmapFile ¶
func OpenMmapFile(path string, mmSize int, flag int, perm os.FileMode, mapFlag int, lock bool) (*MmapFile, error)
OpenMmapFile 打开一个mmapfile path:文件路径,mmSize:映射区大小,flag:文件指定的flag, perm:创建文件的权限, mapFlag:映射时指定的flag, lock:是否锁定映射区
type NormalFile ¶
func NewFile ¶
func NewFile(path string) (*NormalFile, error)
func (*NormalFile) Size ¶
func (fn *NormalFile) Size() int64
Click to show internal directories.
Click to hide internal directories.