The mi_file_unlink() function
The mi_file_unlink() function unlinks (removes) a file that mi_file_open() previously opened.
Syntax
mi_integer mi_file_unlink(fd)
mi_integer fd;
- fd
- The file descriptor of the file to remove. The file descriptor is obtained by a previous call to mi_file_open().
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_file_unlink() function removes the operating-system file that fd identifies. This function is a destructor function for an operating-system file descriptor.
Client only: A call to mi_file_unlink() from
a client LIBMI application raises an exception.
Server only: This function can only unlink
a file that is on the server computer.
Return values
- MI_OK
- The function was successful.
- MI_ERROR
- The function was not successful.
The mi_file_unlink() function does not throw an MI_Exception event when it encounters a runtime error. Therefore, it does not cause callbacks to start.