Emptying the Contents of an I/O Buffer

Emptying the contents of an I/O buffer means that the contents of the buffer are written to disk. You can empty the contents of a buffer by calling mmioFlush or mmioClose. The buffer is automatically emptied when you close a file by calling mmioClose. If you do not close a file immediately after writing to it, empty the contents of the buffer to make sure the information is written to disk. You can also use the MMIO_EMPTYBUF flag of mmioFlush to clear the I/O buffer without deallocating the buffer.

Note: The mmioFlush function may fail if there is insufficient disk space to write the buffer, even if the preceding mmioWrite functions succeeded.