Namespace: \ParagonIE\Halite\Stream
This represents a file that we are writing to, and therefore is mutable.
const ALLOWED_MODES = ['r+b', 'w+b', 'cb', 'c+b'];
// PHP's fread() buffer is set to 8192 by default
const CHUNK = 8192;$fp(private) - File pointerint $pos(private) - Position within the stream (viaftell())array $stat(private) - Statistics about the file (viafstat())
Arguments:
$file- Either a string containing a file location or a resource (file handle opened byfopen())
publicreadBytes(int $num) :string
Read the desired number of bytes from the internal stream, preventing partial reads.
publicreset(int $i = 0)
Set the current position in the stream to the desired value.
publicwriteBytes(string $buf,int $num = null) :int
Write $buf to the internal stream.