4.6.9 Random Access to Files

There are two methods of finding and setting the stream position, stream positioning and seeking. The current position of the read/write pointer in a specified stream can be obtained by using stream_position/2 or stream_property/2. It may be changed by using set_stream_position/2. Alternatively, seek/4 may be used.

Seeking is more general, and stream positioning is more portable. The differences between them are:


Send feedback on this subject.