Convenience class for reading files.
author | |
---|---|
version |
$Id: 1d93fb4a9dd7c74eb44babdf974c1a4e29b69cdf $ |
access |
public |
see | |
package |
phing.system.io |
__construct(object $reader, integer $buffsize = 65536)
object
The reader (e.g. FileReader).
integer
The size of the buffer we should use for reading files.
A large buffer ensures that most files (all scripts?) are parsed in 1 buffer.
close()
throws |
if there is an error closing stream |
---|---|
eof() : boolean
This is important, because filters may want to know if the end of the file (and not just buffer) has been reached.
boolean
getResource() : string
This is critical for, e.g., ExpatParser's ability to know the filename that is throwing an ExpatParserException, etc.
string
mark()
A subsequent call to reset() will move stream position back to last marker (if supported).
markSupported() : boolean
boolean
open()
read(integer $len = null)
If length is specified, then only that number of chars is read, otherwise stream is read until EOF.
integer
readChar() : string
string
single char or -1 if EOF.
readLine()
ready() : boolean
boolean
reset()
skip(integer $n)
integer
bufferSize :
buffer :
bufferPos :
in :