The mi_file_tell() function
The mi_file_tell() function returns the current file seek position for an operating-system file, relative to the beginning of the file.
Syntax
mi_integer mi_file_tell(fd)
mi_integer fd;
- fd
- The file descriptor of the file whose seek position is requested. The file descriptor is obtained by a previous call to the mi_file_open() function.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_file_tell() function obtains the seek position for the operating-system file that fd identifies. The file seek position is the offset for the next read or write operation on the file that is associated with the file descriptor, fd.
Server only: In a C UDR, this function can
obtain the seek position of a file that resides on either the server
or client computer. You specify the location of the file when you
open it with the mi_file_open() function.
Return values
- >=0
- The current seek position, measured in number of bytes from the beginning of the file.
- MI_ERROR
- The function was not successful.
The mi_file_tell() function does not throw an MI_Exception event when it encounters a runtime error. Therefore, it does not cause callbacks to start.