The mi_file_sync() function

The mi_file_sync() function forces a write to disk of all pages in an operating-system file.

Syntax

mi_integer mi_file_sync(fd)
   mi_integer fd;
fd
The file descriptor of the file to be written to disk. The file descriptor is obtained by a previous call to the mi_file_open() function.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_file_sync() function writes to disk all pages of the operating-system file that the fd file descriptor identifies.

Server only: This function can force a write only for a file that resides on the server computer.

The mi_file_sync() interface routine has no effect on Windows clients.

Return values

MI_OK
The function was successful.
MI_ERROR
The function was not successful.

The mi_file_sync() function does not throw an MI_Exception event when it encounters a runtime error. Therefore, it does not cause callbacks to start.

Related topics

See also the description of The mi_file_open() function.