GetFileRWManager will return a FileIORWManager Object
(path string, capacity int64, segmentSize int64, readOnly bool)
| 73 | |
| 74 | // GetFileRWManager will return a FileIORWManager Object |
| 75 | func (fm *FileManager) GetFileRWManager(path string, capacity int64, segmentSize int64, readOnly bool) (*fileio.FileIORWManager, error) { |
| 76 | fd, err := fm.fdm.GetFd(path) |
| 77 | if err != nil { |
| 78 | return nil, err |
| 79 | } |
| 80 | err = fileio.Truncate(path, capacity, fd, readOnly) |
| 81 | if err != nil { |
| 82 | return nil, err |
| 83 | } |
| 84 | |
| 85 | return &fileio.FileIORWManager{Fd: fd, Path: path, Fdm: fm.fdm, SegmentSize: segmentSize}, nil |
| 86 | } |
| 87 | |
| 88 | // GetMMapRWManager will return a MMapRWManager Object |
| 89 | func (fm *FileManager) GetMMapRWManager(path string, capacity int64, segmentSize int64, readOnly bool) (*fileio.MMapRWManager, error) { |
no test coverage detected