Qore Programming Language Reference Manual 1.17.0
Loading...
Searching...
No Matches
QC_FileLineIterator.dox.h
1
2namespace Qore {
4
33
34public:
36
47 constructor(string path, *string encoding, *string eol, bool trim = True, *bool nonblocking_open);
48
49public:
51
59
60public:
62
72string getEncoding();
73
74public:
76
86string getFileName();
87
88public:
90
107string getLine();
108
109public:
111
128string getValue();
129
130public:
132
146hash<StatInfo> hstat();
147
148public:
150
162int index();
163
164public:
166
176bool isTty();
177
178public:
180
194bool next();
195
196public:
198
208
209public:
211
224list<auto> stat();
225
226public:
228
239bool valid();
240};
241}
This class defines an abstract interface for line iterators.
Definition: QC_AbstractLineIterator.dox.h:8
This class defines a line iterator for text files.
Definition: QC_FileLineIterator.dox.h:32
copy()
Creates a new FileLineIterator object, based on the same object being iterated in the original object...
string getFileName()
Returns the file path/name used to open the file.
string getLine()
Returns the current line in the file or throws an ITERATOR-ERROR exception if the iterator is invalid...
bool isTty()
Returns True if the FileLineIterator is connected to a terminal device, False if not.
hash< StatInfo > hstat()
Returns StatInfo hash of hstat() of the underlying file.
string getValue()
Returns the current line in the file or throws an ITERATOR-ERROR exception if the iterator is invalid...
list< auto > stat()
Returns Stat List of stat() of the underlying file.
bool valid()
Returns True if the iterator is currently pointing at a valid element, False if not.
bool next()
Moves the current position to the next line in the file; returns False if there are no more lines to ...
int index()
Returns the current iterator line number in the file (the first line is line 1) or 0 if not pointing ...
reset()
Reset the iterator instance to its initial state.
constructor(string path, *string encoding, *string eol, bool trim=True, *bool nonblocking_open)
Opens the given file for reading with the given options and creates the FileLineIterator object.
string getEncoding()
Returns the character encoding for the FileLineIterator.
const True
logical True
Definition: qc_qore.dox.h:98
nothing trim()
This function variant does nothing at all; it is only included for backwards-compatibility with qore ...
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2