Question about readfile

Blitz3D Forums/Blitz3D Programming/Question about readfile

JohnMil(Posted 2006) [#1]
I was looking at the example that came with B3D on how to use ReadFile. The question is, it seems that you have to read everything exactly in the order that it was saved to the file. Is this correct? And if so, is there a way to read info without having to read all the other data before it?


Matty(Posted 2006) [#2]
Have a look at the commands 'seekfile' and 'filepos'. You still have to know how the file is arranged though otherwise you are not going to know where to look in the file.


JohnMil(Posted 2006) [#3]
Ah! Thank you very much!


John Blackledge(Posted 2006) [#4]
Or if ultra high speed is not an issue check out the use of INI files (code archives).
When Windows first reads an INI file it buffers it, so subsequent reads are done in memory i.e. it doesn't have to access the disk every time, so can be very fast.