Qore FileLocationHandler Module Reference 2.3
Loading...
Searching...
No Matches
FileLocationHandler::AbstractFileLocationHandler Class Reference

The abstract file location handler class. More...

#include <FileLocationHandler.qc.dox.h>

Inheritance diagram for FileLocationHandler::AbstractFileLocationHandler:
[legend]

Public Member Methods

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.
 

Private Member Methods

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 Private Member Methods

static string forceEncoding (string str, *string encoding)
 Returns a string tagged with the given encoding, if any.
 

Detailed Description

The abstract file location handler class.

Member Function Documentation

◆ getBinaryFile()

binary FileLocationHandler::AbstractFileLocationHandler::getBinaryFile ( string  scheme,
string  location,
*hash< auto >  opts 
)

Retrieves a binary file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread 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 
)
private

Retrieves a binary file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread 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
schemethe scheme being used
locationthe location string without the scheme
optsread 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 
)
private

Retrieves a binary file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread 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
schemethe scheme being used
locationthe location string without the scheme
optsread 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 
)
private

Retrieves an I/O poller to retrieve a binary file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread 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
schemethe scheme being used
locationthe location string without the scheme
optswrite options
Returns
an output stream for writing to the file
Note

◆ getOutputStreamImpl()

abstract OutputStreamWrapper FileLocationHandler::AbstractFileLocationHandler::getOutputStreamImpl ( string  scheme,
string  location,
*hash< auto >  opts 
)
private

Returns an output stream for writing data to the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optswrite 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 ( )
private

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
schemethe scheme being used
locationthe location string without the scheme
optsread 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 
)
private

Returns a string stream for the file's data at the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread 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
schemethe scheme being used
locationthe location string without the scheme or options
optsread 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 
)
private

Retrieves a text file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread 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 ( )
private

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
schemethe scheme being used
locationthe location string without the scheme
contentsthe file's contents
optswrite options

◆ writeFileImpl()

abstract FileLocationHandler::AbstractFileLocationHandler::writeFileImpl ( string  scheme,
string  location,
data  contents,
*hash< auto >  opts 
)
private

Writes data to a file at the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
contentsthe file's contents
optswrite options