All Classes Namespaces Functions Variables Groups Pages
QC_FileLineIterator.dox.h
namespace Qore {
class FileLineIterator : public AbstractIterator {
public:
constructor(string path, *string encoding, *string eol, bool trim = True);
public:
copy();
public:
string getEncoding();
public:
string getFileName();
public:
string getLine();
public:
int getPos();
public:
string getValue();
public:
hash hstat();
public:
int index();
public:
bool isTty();
public:
bool next();
public:
reset();
public:
list stat();
public:
bool valid();
};
};
Qore::FileLineIterator::getPos
int getPos()
Returns the current file position as an integer giving the offset in bytes from the beginning of the ...
Qore::FileLineIterator::valid
bool valid()
returns True if the iterator is currently pointing at a valid element, False if not ...
Qore::FileLineIterator::stat
list stat()
returns Stat List of stat() of the underlying file
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:94
Qore::FileLineIterator::constructor
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 ...
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::list
list list(...)
Returns a list of the arguments passed at the top level.
Qore::FileLineIterator::getValue
string getValue()
returns the current line in the file or throws an INVALID-ITERATOR exception if the iterator is inval...
Qore::FileLineIterator::reset
reset()
Reset the iterator instance to its initial state.
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:31
Qore::FileLineIterator::copy
copy()
Creates a new FileLineIterator object, based on the same object being iterated in the original object...
Qore::FileLineIterator::getEncoding
string getEncoding()
Returns the character encoding for the FileLineIterator.
Qore::FileLineIterator::hstat
hash hstat()
returns Stat Hash of hstat() of the underlying file
Qore::FileLineIterator::getLine
string getLine()
returns the current line in the file or throws an INVALID-ITERATOR exception if the iterator is inval...
Qore::hash
hash hash(object obj)
Returns a hash of an object&#39;s members.
Qore::AbstractIterator
This class defines an abstract interface for iterators.
Definition: QC_AbstractIterator.dox.h:10