Home | Previous Page | Next Page   Function Descriptions >

mi_file_allocate( )

The mi_file_allocate( ) function ensures that a specified number of files are available to be opened.

Syntax

mi_integer mi_file_allocate(num_files)
   mi_integer num_files;
num_files
specifies how many file descriptors to allocate.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_file_allocate( ) function allocates num_files number of file descriptors for use with operating-system calls, such as UNIX open( ) or fopen( ).

Tip:
The mi_file_allocate( ) function is provided for backward compatibility only. This function is not required for file access in DataBlade API modules. In new code, use DataBlade API file-access functions such as mi_file_open( ) and mi_file_close( ).
Server Only

This function does not perform any tasks when called within a UDR.

End of Server Only

Return Values

>=0
is the number of file descriptors that mi_file_allocate( ) has allocated.
MI_ERROR
indicates that the function was not successful.

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

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]