Return the current position of the stream
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.
stream_position is called on a stream that does not support it, an exception is raised.
Core Module Index | Contents