public int Tell()
{
if (!CanSeek)
{
PhpException.Throw(PhpError.Warning, ErrResources.wrapper_op_unsupported, "Seek");
return -1;
}
switch (currentAccess)
{
default:
// Stream not yet R/W accessed (but maybe with Seek).
return readOffset;
case FileAccess.Read:
return ReadPosition;
case FileAccess.Write:
return WritePosition;
}
}