file_seek (var handle,var offset,var mode)
Places the read/write pointer to a certain position in the file, or reads the
pointer position.
Returns:
File read/write pointer position when mode is 4.
Parameters:
handle - File handle.
offset - New read position in bytes from the position
given by the mode parameter.
mode - 0 = from
beginning
of the file, 1 = from the current read position, 2 =
from the end of the file.
mode - 4 = does not alter but return the read/write
pointer position.
Example:
fhandle = file_open_read("test.txt"); // test.txt contains "this,is,a,test"
file_seek(fhandle,5,0); // skip the first 5 bytes
file_str_read(fhandle,test_str); // test_str now contains "is"
file_close(fhandle);
See also:
file_open_read,
file_open_game,, file_close,
file_var_write, file_var_read,
file_str_write, file_chr_read,
file_asc_write, file_asc_read, txt_load, delimit_str
► latest
version online