Qore Programming Language Reference Manual  0.8.13.4
QC_FileLineIterator.dox.h
1 namespace Qore {
4 
33 
34 public:
36 
44  constructor(string path, *string encoding, *string eol, bool trim = True);
45 
46 public:
48 
55  copy();
56 
57 public:
59 
69 string getEncoding();
70 
71 public:
73 
83 string getFileName();
84 
85 public:
87 
104 string getLine();
105 
106 public:
108 
125 string getValue();
126 
127 public:
129 
143 hash<StatInfo> hstat();
144 
145 public:
147 
159 int index();
160 
161 public:
163 
173 bool isTty();
174 
175 public:
177 
191 bool next();
192 
193 public:
195 
204  reset();
205 
206 public:
208 
221 list stat();
222 
223 public:
225 
236 bool valid();
237 };
238 };
hash< StatInfo > hstat()
Returns StatInfo hash of hstat() of the underlying file.
bool valid()
Returns True if the iterator is currently pointing at a valid element, False if not.
list stat()
Returns Stat List of stat() of the underlying file.
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 ...
list list(...)
Returns an untyped list of the arguments passed at the top level.
This class defines an abstract interface for line iterators.
Definition: QC_AbstractLineIterator.dox.h:8
string getValue()
Returns the current line in the file or throws an ITERATOR-ERROR exception if the iterator is invalid...
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:32
copy()
Creates a new FileLineIterator object, based on the same object being iterated in the original object...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
string getEncoding()
Returns the character encoding for the FileLineIterator.
string getLine()
Returns the current line in the file or throws an ITERATOR-ERROR exception if the iterator is invalid...