stream_position


stream_position(s)
      

Return the current position of the stream s.

A stream may allow queries to determine its current position in the underlying stream of bytes or characters. If so, stream_position returns the current position. For binary streams, the position is always an exact nonnegative integer byte displacement from the start of the byte stream. For textual streams, the representation of a position is unspecified; it may not be an exact nonnegative integer and, even if it is, it may not represent either a byte or character displacement in the underlying stream.

If stream_position is called on a stream that does not support it, an exception is raised.

Also see:

stream_has_position
set_stream_position


Core Module Index | Contents