Call the operating-system open call

To open a file, the mi_file_open() function calls the open system call that your operating system supports.

On UNIX™ or Linux™, the open() system call opens an operating-system file.

On Windows™, the _open command opens an operating-system file.

The mi_file_open() function provides the following information about the file to the appropriate system call.
Argument of mi_file_open() Information provided
open_flags (second argument) Access mode for the operating-system file
open_mode (third argument) Open mode for the operating-system file.
The function takes this information and passes it directly to the underlying operating-system call. Therefore, mi_file_open() supports the access modes and open modes that your operating-system open call supports.
Tip: For more information about the open flags and open mode, see the documentation for your operating-system open call.