Access operating-system files in client LIBMI applications

In a client LIBMI application, the DataBlade® API file-access functions perform the same type of task as operating-system file-management functions such as open() and close(). DataBlade API file-access functions shows the basic file operations with the DataBlade® API file-access functions that perform them and the analogous operating-system calls for these file operations.

Use of the DataBlade® API file-access functions is optional in a client LIBMI application. However, use of the DataBlade® API file-access functions to ensure consistency and portability of code between client and server DataBlade® API modules is recommended.
Tip: To use these DataBlade® API file-access functions, be sure to include the mi.h header file in the appropriate source files of your client LIBMI application.

For DataBlade® API modules that you design to run in both client LIBMI applications and UDRs, use the DataBlade® API file-access functions. The behavior of these functions in client LIBMI applications is basically the same as in C UDRs. For a description of these files, see Access to operating-system files.

The main difference in behavior of the DataBlade® API file-access functions is that the mi_open() function opens files on the client computer, not the server computer. The file name that you specify to mi_open() is relative to the client computer.