![]() |
FOSSology
4.6.0-rc1
Open Source License Compliance by Open Source Software
|

Public Member Functions | |
| __construct ($file) | |
| getError () | |
| getFileResource () | |
| getLine ($FD) | |
Public Attributes | |
| $inputFile | |
Protected Attributes | |
| $error | |
| $fileResource | |
class to read simple input file. Takes care of # comment lines and blank lines.
Created on Jun 6, 2008
Definition at line 17 of file ReadInputFile.php.
| ReadInputFile::__construct | ( | $file | ) |
function __construct Constructor for ReadInputFile
| string | $file,the | path to the input file to read The file should exist and be readable. |
Definition at line 32 of file ReadInputFile.php.
| ReadInputFile::getLine | ( | $FD | ) |
function getLine
Get a line of data from the open file resource. Will skip any comment lines or blank lines. A comment line is a line starting with #
getline always reads 1024 bytes of data from the file. It expects each line to have a new-line which will terminate the read. If the file is not formatted this way, it will just return 1k of data per read.
| $FD | opened file resource e.g. $f = new ReadInputFile('foo'); $FD = f->getFileResource(); $f->getLine(FD); |
Definition at line 78 of file ReadInputFile.php.