TotalSize returns the current size of the backing file in bytes, which is an upper bound on the amount of memory that can currently be allocated from the MemoryFile. The value returned by TotalSize is permitted to change.
()
| 1765 | // upper bound on the amount of memory that can currently be allocated from the |
| 1766 | // MemoryFile. The value returned by TotalSize is permitted to change. |
| 1767 | func (f *MemoryFile) TotalSize() uint64 { |
| 1768 | return uint64(len(f.chunksLoad())) * chunkSize |
| 1769 | } |
| 1770 | |
| 1771 | // File returns the backing file. |
| 1772 | func (f *MemoryFile) File() *os.File { |
no test coverage detected