| Qore Programming Language Reference Manual 1.0.8

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