Qore Programming Language Reference Manual 1.19.2
|
File poll operation object returned by File polling methods. More...
#include <QC_FilePollOperation.dox.h>
Public Member Methods | |
constructor (ReadOnlyFile file, string path, bool to_string, int num_bytes=-1) | |
Creates the object with the given goal. More... | |
*hash< SocketPollInfo > | continuePoll () |
Returns a socket poll hash if polling should continue or NOTHING if complete. More... | |
copy () | |
Throws an exception; objects of this class cannot be copied. More... | |
destructor () | |
Destroys the object. More... | |
Public Member Methods inherited from Qore::SocketPollOperationBase | |
constructor () | |
Throws an exception; this class is not usable by Qore classes. More... | |
destructor () | |
Destroys the object. | |
string | getGoal () |
Returns the goal. More... | |
auto | getOutput () |
Returns any output generated by any completed poll action. More... | |
string | getState () |
Returns the current state. More... | |
bool | goalReached () |
Returns True when the goal as been reached. More... | |
Public Member Methods inherited from Qore::AbstractPollOperation | |
abstract *hash< SocketPollInfo > | continuePoll () |
Returns a socket poll hash if polling should continue or NOTHING if complete. More... | |
abstract string | getGoal () |
Returns the goal. More... | |
auto | getOutput () |
Returns any output generated by any completed poll action. More... | |
abstract string | getState () |
Returns the current state. More... | |
abstract bool | goalReached () |
Returns True when the goal as been reached. More... | |
File poll operation object returned by File polling methods.
This class implements the polling logic for Files and the state machine behind it
private members:
Qore::FilePollOperation::constructor | ( | ReadOnlyFile | file, |
string | path, | ||
bool | to_string, | ||
int | num_bytes = -1 |
||
) |
Creates the object with the given goal.
file | the File object to poll |
path | the path to read |
to_string | if the output should be a string or not; if so, the string's encoding will be the same as the File's encoding |
num_bytes | the number of bytes to read; < 0 means read the entire file |
|
virtual |
Returns a socket poll hash if polling should continue or NOTHING if complete.
Implements Qore::AbstractPollOperation.
Qore::FilePollOperation::copy | ( | ) |
Throws an exception; objects of this class cannot be copied.
FILEPOLLOPERATION-COPY-ERROR | objects of this class cannot be copied |
Qore::FilePollOperation::destructor | ( | ) |
Destroys the object.
Destroys the object