Qore Programming Language Reference Manual  0.8.9
 All Classes Namespaces Functions Variables Groups Pages
QC_FileLineIterator.dox.h
1 namespace Qore {
4 
30 
31 public:
33 
42  constructor(string path, *string encoding, *string eol, bool trim = True);
43 
44 public:
46 
54  copy();
55 
56 public:
58 
68 string getEncoding();
69 
70 public:
72 
82 string getFileName();
83 
84 public:
86 
103 string getLine();
104 
105 public:
107 
121 int getPos();
122 
123 public:
125 
142 string getValue();
143 
144 public:
146 
158 int index();
159 
160 public:
162 
172 bool isTty();
173 
174 public:
176 
190 bool next();
191 
192 public:
194 
203  reset();
204 
205 public:
207 
218 bool valid();
219 };
220 };
int getPos()
Returns the current file position as an integer giving the offset in bytes from the beginning of the ...
bool valid()
returns True if the iterator is currently pointing at a valid element, False if not ...
string trim(string str, *string chars)
Removes byte characters from the start and end of a string and returns the new string (also see the t...
const True
logical True
Definition: qc_qore.dox.h:94
constructor(string path, *string encoding, *string eol, bool trim=True)
opens the given file for reading with the given options and creates the FileLineIterator object ...
string getFileName()
returns the file path/name used to open the file
bool next()
Moves the current position to the next line in the file; returns False if there are no more lines to ...
string getValue()
returns the current line in the file or throws an INVALID-ITERATOR exception if the iterator is inval...
reset()
Reset the iterator instance to its initial state.
int index()
returns the current iterator line number in the file (the first line is line 1) or 0 if not pointing ...
bool isTty()
returns True if the FileLineIterator is connected to a terminal device, False if not ...
This class defines a line iterator for text files.
Definition: QC_FileLineIterator.dox.h:29
copy()
Creates a new FileLineIterator object, based on the same object being iterated in the original object...
string getEncoding()
Returns the character encoding for the FileLineIterator.
string getLine()
returns the current line in the file or throws an INVALID-ITERATOR exception if the iterator is inval...
This class defines an abstract interface for iterators.
Definition: QC_AbstractIterator.dox.h:10