示例#1
0
 function __construct($file = null, $mode = \IO\Stream\Mode::READ)
 {
     if (is_string($file)) {
         $file = new File($file);
     }
     if (!$file instanceof File) {
         throw new \IO\Exception('GZ\\Stream may only open GZ\\File');
     }
     parent::__construct($file, $mode);
 }
示例#2
0
<?php

use IO;
use IO\File;
use IO\Text;
$file = new File('tests\\test.ini');
$stream = new File\Stream($file);
$reader = new File\Reader($stream);
$text = new Text\Reader($reader);
$stream->open();
while (($buffer = $text->readLine()) !== false) {
    echo $buffer;
    echo '<br/>';
}
$stream->close();