The abstract file location handler class.
More...
#include <FileLocationHandler.qc.dox.h>
|
binary | getBinaryFile (string scheme, string location, *hash< auto > opts) |
| Retrieves a binary file from the given location.
|
|
Qore::InputStream | getBinaryStream (string scheme, string location, *hash< auto > opts) |
| Retrieves a binary file from the given location.
|
|
Qore::AbstractPollOperation | getIoPollerForLocation (string scheme, string location, *hash< auto > opts) |
| Retrieves an I/O poller to retrieve a binary file from the given location.
|
|
OutputStreamWrapper | getOutputStream (string scheme, string location, *hash< auto > opts) |
| Returns an output stream for writing data to the given location.
|
|
hash< string, hash< FileHandlerOptionInfo > > | getReadOptions () |
| Gets supported read options.
|
|
Qore::StreamReader | getStreamReader (string scheme, string location, *hash< auto > opts) |
| Returns a string stream for the file's data at the given location.
|
|
string | getTextFile (string scheme, string location, *hash< auto > opts) |
| Retrieves a text file from the given location.
|
|
hash< string, hash< FileHandlerOptionInfo > > | getWriteOptions () |
| Gets supported write options.
|
|
| writeFile (string scheme, string location, data contents, *hash< auto > opts) |
| Writes data to a file at the given location.
|
|
|
abstract binary | getBinaryFileImpl (string scheme, string location, *hash< auto > opts) |
| Retrieves a binary file from the given location.
|
|
abstract Qore::InputStream | getBinaryStreamImpl (string scheme, string location, *hash< auto > opts) |
| Retrieves a binary file from the given location.
|
|
abstract Qore::AbstractPollOperation | getIoPollerForLocationImpl (string scheme, string location, *hash< auto > opts) |
| Retrieves an I/O poller to retrieve a binary file from the given location.
|
|
abstract OutputStreamWrapper | getOutputStreamImpl (string scheme, string location, *hash< auto > opts) |
| Returns an output stream for writing data to the given location.
|
|
abstract hash< string, hash< FileHandlerOptionInfo > > | getReadOptionsImpl () |
| Gets supported read options.
|
|
abstract Qore::StreamReader | getStreamReaderImpl (string scheme, string location, *hash< auto > opts) |
| Returns a string stream for the file's data at the given location.
|
|
abstract string | getTextFileImpl (string scheme, string location, *hash< auto > opts) |
| Retrieves a text file from the given location.
|
|
abstract hash< string, hash< FileHandlerOptionInfo > > | getWriteOptionsImpl () |
| Gets supported write options.
|
|
abstract | writeFileImpl (string scheme, string location, data contents, *hash< auto > opts) |
| Writes data to a file at the given location.
|
|
|
static string | forceEncoding (string str, *string encoding) |
| Returns a string tagged with the given encoding, if any.
|
|
The abstract file location handler class.
◆ getBinaryFile()
binary FileLocationHandler::AbstractFileLocationHandler::getBinaryFile |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
Retrieves a binary file from the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- the binary data of the file's contents, if it can be retrieved
◆ getBinaryFileImpl()
abstract binary FileLocationHandler::AbstractFileLocationHandler::getBinaryFileImpl |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
|
protected |
Retrieves a binary file from the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- the binary data of the file's contents, if it can be retrieved
◆ getBinaryStream()
Qore::InputStream FileLocationHandler::AbstractFileLocationHandler::getBinaryStream |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
Retrieves a binary file from the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- an input stream of the file's contents, if it can be retrieved
- Note
- The data is read in the background and added to the input stream
◆ getBinaryStreamImpl()
abstract Qore::InputStream FileLocationHandler::AbstractFileLocationHandler::getBinaryStreamImpl |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
|
protected |
Retrieves a binary file from the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- an input stream of the file's contents, if it can be retrieved
◆ getIoPollerForLocation()
Qore::AbstractPollOperation FileLocationHandler::AbstractFileLocationHandler::getIoPollerForLocation |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
Retrieves an I/O poller to retrieve a binary file from the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- an I/O poller to retrieve the file's data
◆ getIoPollerForLocationImpl()
abstract Qore::AbstractPollOperation FileLocationHandler::AbstractFileLocationHandler::getIoPollerForLocationImpl |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
|
protected |
Retrieves an I/O poller to retrieve a binary file from the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- an I/O poller to retrieve the file's data
◆ getOutputStream()
OutputStreamWrapper FileLocationHandler::AbstractFileLocationHandler::getOutputStream |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
Returns an output stream for writing data to the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | write options |
- Returns
- an output stream for writing to the file
- Note
-
◆ getOutputStreamImpl()
abstract OutputStreamWrapper FileLocationHandler::AbstractFileLocationHandler::getOutputStreamImpl |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
|
protected |
Returns an output stream for writing data to the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | write options |
- Returns
- an output stream for writing to the file
- Note
-
◆ getReadOptions()
hash< string, hash< FileHandlerOptionInfo > > FileLocationHandler::AbstractFileLocationHandler::getReadOptions |
( |
| ) |
|
Gets supported read options.
- Returns
- supported read options
◆ getReadOptionsImpl()
abstract hash< string, hash< FileHandlerOptionInfo > > FileLocationHandler::AbstractFileLocationHandler::getReadOptionsImpl |
( |
| ) |
|
|
protected |
Gets supported read options.
- Returns
- supported read options
◆ getStreamReader()
Qore::StreamReader FileLocationHandler::AbstractFileLocationHandler::getStreamReader |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
Returns a string stream for the file's data at the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- a stream reader for the file's contents, if it can be retrieved
- Note
- The data is read in the background and added to the input stream backing the stream reader
◆ getStreamReaderImpl()
abstract Qore::StreamReader FileLocationHandler::AbstractFileLocationHandler::getStreamReaderImpl |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
|
protected |
Returns a string stream for the file's data at the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- a stream reader for the file's contents, if it can be retrieved
◆ getTextFile()
string FileLocationHandler::AbstractFileLocationHandler::getTextFile |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
Retrieves a text file from the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme or options |
opts | read options |
- Returns
- the string of the file's contents, if it can be retrieved
◆ getTextFileImpl()
abstract string FileLocationHandler::AbstractFileLocationHandler::getTextFileImpl |
( |
string | scheme, |
|
|
string | location, |
|
|
*hash< auto > | opts ) |
|
protected |
Retrieves a text file from the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
opts | read options |
- Returns
- the string of the file's contents, if it can be retrieved
◆ getWriteOptions()
hash< string, hash< FileHandlerOptionInfo > > FileLocationHandler::AbstractFileLocationHandler::getWriteOptions |
( |
| ) |
|
Gets supported write options.
- Returns
- supported write options
◆ getWriteOptionsImpl()
abstract hash< string, hash< FileHandlerOptionInfo > > FileLocationHandler::AbstractFileLocationHandler::getWriteOptionsImpl |
( |
| ) |
|
|
protected |
Gets supported write options.
- Returns
- supported write options
◆ writeFile()
FileLocationHandler::AbstractFileLocationHandler::writeFile |
( |
string | scheme, |
|
|
string | location, |
|
|
data | contents, |
|
|
*hash< auto > | opts ) |
Writes data to a file at the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
contents | the file's contents |
opts | write options |
◆ writeFileImpl()
abstract FileLocationHandler::AbstractFileLocationHandler::writeFileImpl |
( |
string | scheme, |
|
|
string | location, |
|
|
data | contents, |
|
|
*hash< auto > | opts ) |
|
protected |
Writes data to a file at the given location.
- Parameters
-
scheme | the scheme being used |
location | the location string without the scheme |
contents | the file's contents |
opts | write options |