53 string getTextFile(
string scheme,
string location, *hash<auto> opts);
96 writeFile(
string scheme,
string location, data contents, *hash<auto> opts);
141 abstract string getTextFileImpl(
string scheme,
string location, *hash<auto> opts);
184 abstract writeFileImpl(
string scheme,
string location, data contents, *hash<auto> opts);
227 static hash<string, AbstractFileLocationHandler>
cache;
230 static Mutex handler_lock();
246 static list<string> getSupportedSchemes();
253 static bool isSchemeSupported(
string scheme);
262 static string getTextFileFromLocation(
string location);
271 static binary getBinaryFileFromLocation(
string location);
279 static data getFileFromLocation(
bool text,
string location);
299 static writeFileToLocation(
string location, data contents);
320 static hash<LocationInfo> getInfo(
string location,
bool read);
324 static *hash<auto> getOptions(reference<string> location);
331 hashdecl LocationInfo {
335 AbstractFileLocationHandler handler;
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.
abstract hash< string, hash< FileHandlerOptionInfo > > getWriteOptionsImpl()
Gets supported write options.
bool required
Required flag.
Definition: FileLocationHandler.qc.dox.h:33
abstract hash< string, hash< FileHandlerOptionInfo > > getReadOptionsImpl()
Gets supported read options.
OutputStreamWrapper getOutputStream(string scheme, string location, *hash< auto > opts)
Returns an output stream for writing data to the given location.
static hash< string, AbstractFileLocationHandler > cache
The location handler cache; scheme -> handler;.
Definition: FileLocationHandler.qc.dox.h:227
auto default_value
Default value, if any.
Definition: FileLocationHandler.qc.dox.h:39
static string forceEncoding(string str, *string encoding)
Returns a string tagged with the given encoding, if any.
abstract binary getBinaryFileImpl(string scheme, string location, *hash< auto > opts)
Retrieves a binary file from the given location.
hash< string, hash< FileHandlerOptionInfo > > getWriteOptions()
Gets supported write 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 OutputStreamWrapper getOutputStreamImpl(string scheme, string location, *hash< auto > opts)
Returns an output stream for writing data to the given location.
Contains all public definitions in the FileLocationHandler module.
Definition: FileLocationHandler.qc.dox.h:26
The abstract file location handler class.
Definition: OutputStramWrapper.qc.dox.h:28
hash< string, hash< FileHandlerOptionInfo > > getReadOptions()
Gets supported read options.
The abstract file location handler class.
Definition: FileLocationHandler.qc.dox.h:43
string desc
The option description.
Definition: FileLocationHandler.qc.dox.h:36
string type
The option value type: "string", "bool", or "int".
Definition: FileLocationHandler.qc.dox.h:30
writeFile(string scheme, string location, data contents, *hash< auto > opts)
Writes data to a file at the given location.
abstract writeFileImpl(string scheme, string location, data contents, *hash< auto > opts)
Writes data to a file at the given location.
abstract string getTextFileImpl(string scheme, string location, *hash< auto > opts)
Retrieves a text file from the given location.
File handler option info.
Definition: FileLocationHandler.qc.dox.h:28
abstract Qore::InputStream getBinaryStreamImpl(string scheme, string location, *hash< auto > opts)
Retrieves a binary file from the given location.
Definition: FileLocationHandler.qc.dox.h:330
Qore::InputStream getBinaryStream(string scheme, string location, *hash< auto > opts)
Retrieves a binary file from the given location.
binary getBinaryFile(string scheme, string location, *hash< auto > opts)
Retrieves a binary file from the given location.