53 string getTextFile(
string scheme,
string location, __7_ hash<auto> opts);
96 writeFile(
string scheme,
string location, data contents, __7_ hash<auto> opts);
141 abstract string getTextFileImpl(
string scheme,
string location, __7_ hash<auto> opts);
184 abstract writeFileImpl(
string scheme,
string location, data contents, __7_ hash<auto> opts);
227 static hash<string, AbstractFileLocationHandler>
cache;
320 static hash<LocationInfo>
getInfo(
string location,
bool read);
324 static __7_ hash<auto>
getOptions(reference<string> location);
331 hashdecl LocationInfo {
335 AbstractFileLocationHandler handler;
The abstract file location handler class.
Definition: FileLocationHandler.qc.dox.h:43
abstract string getTextFileImpl(string scheme, string location, __7_ hash< auto > opts)
Retrieves a text file from the given location.
abstract binary getBinaryFileImpl(string scheme, string location, __7_ hash< auto > opts)
Retrieves a binary file from the given location.
Qore::StreamReader getStreamReader(string scheme, string location, __7_ hash< auto > opts)
Returns a string stream for the file's data at the given location.
binary getBinaryFile(string scheme, string location, __7_ hash< auto > opts)
Retrieves a binary file from the given location.
string getTextFile(string scheme, string location, __7_ hash< auto > opts)
Retrieves a text file from the given location.
hash< string, hash< FileHandlerOptionInfo > > getWriteOptions()
Gets supported write options.
abstract hash< string, hash< FileHandlerOptionInfo > > getReadOptionsImpl()
Gets supported read options.
abstract Qore::StreamReader getStreamReaderImpl(string scheme, string location, __7_ hash< auto > opts)
Returns a string stream for the file's data at the given location.
writeFile(string scheme, string location, data contents, __7_ hash< auto > opts)
Writes data to a file at the given location.
abstract hash< string, hash< FileHandlerOptionInfo > > getWriteOptionsImpl()
Gets supported write options.
OutputStreamWrapper getOutputStream(string scheme, string location, __7_ hash< auto > opts)
Returns an output stream for writing data to the given location.
Qore::InputStream getBinaryStream(string scheme, string location, __7_ hash< auto > opts)
Retrieves a binary file from the given location.
abstract OutputStreamWrapper getOutputStreamImpl(string scheme, string location, __7_ hash< auto > opts)
Returns an output stream for writing data to the given location.
abstract Qore::InputStream getBinaryStreamImpl(string scheme, string location, __7_ hash< auto > opts)
Retrieves a binary file from the given location.
static string forceEncoding(string str, __7_ string encoding)
Returns a string tagged with the given encoding, if any.
abstract writeFileImpl(string scheme, string location, data contents, __7_ hash< auto > opts)
Writes data to a file at the given location.
hash< string, hash< FileHandlerOptionInfo > > getReadOptions()
Gets supported read options.
static data getFileFromLocation(bool text, string location)
Returns the file data from the given location.
static Qore::StreamReader getStreamReaderFromLocation(string location)
Returns a string stream for the file's data at the given location.
static Qore::InputStream getBinaryStreamFromLocation(string location)
Returns an input stream for file data at the given location.
static bool isSchemeSupported(string scheme)
Returns True if the scheme is supported.
static registerHandler(string scheme, AbstractFileLocationHandler handler)
Register a new location handler.
static hash< string, AbstractFileLocationHandler > cache
The location handler cache; scheme -> handler;.
Definition: FileLocationHandler.qc.dox.h:227
static hash< LocationInfo > getInfo(string location, bool read)
Returns info about the requested location.
static OutputStreamWrapper getOutputStreamForLocation(string location)
Returns an output stream for writing data to the given location.
static list< string > getSupportedSchemes()
Retuns a list of supported schemes.
static __7_ hash< auto > getOptions(reference< string > location)
Returns a hash of options from the location string.
static binary getBinaryFileFromLocation(string location)
Returns binary data for the given file location.
static Mutex handler_lock()
The location handler lock to ensure atomic operations.
static writeFileToLocation(string location, data contents)
Writes data to a file at the given location.
static string getTextFileFromLocation(string location)
Returns string data for the given file location.
The abstract file location handler class.
Definition: OutputStramWrapper.qc.dox.h:28
Contains all public definitions in the FileLocationHandler module.
Definition: FileLocationHandler.qc.dox.h:26
File handler option info.
Definition: FileLocationHandler.qc.dox.h:28
string type
The option value type: "string", "bool", or "int".
Definition: FileLocationHandler.qc.dox.h:30
auto default_value
Default value, if any.
Definition: FileLocationHandler.qc.dox.h:39
string desc
The option description.
Definition: FileLocationHandler.qc.dox.h:36
bool required
Required flag.
Definition: FileLocationHandler.qc.dox.h:33