informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_file_read()

The mi_file_read() function reads a specified number of bytes from an open operating-system file into a buffer.

Syntax

Usage

The mi_file_read() function reads nbytes bytes of data from the file that the fd file descriptor identifies. The read begins at the current seek position for fd. You can use the mi_file_tell() function to obtain the current seek position. The function reads this data into the user-allocated buffer that buf references.

This function can access files on the server computer from a C UDR.

Return Values

>=0 is the actual number of bytes that the function has read from the open file to the buf character buffer.
MI_ERROR indicates that the function was not successful.

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

Related Topics

See the descriptions of the following functions: mi_file_open(), mi_file_seek(), mi_file_tell(), and mi_file_write().


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved