DART
6.10.1
|
ResourceRetriever provides methods for testing for the existance of and accessing the content of a resource specified by URI. More...
#include <ResourceRetriever.hpp>
Public Member Functions | |
virtual | ~ResourceRetriever ()=default |
virtual bool | exists (const Uri &uri)=0 |
Returns whether the resource specified by a URI exists. More... | |
virtual ResourcePtr | retrieve (const Uri &uri)=0 |
Returns the resource specified by a URI or nullptr on failure. More... | |
virtual std::string | readAll (const Uri &uri) |
Reads all data from the resource of uri, and returns it as a string. More... | |
virtual std::string | getFilePath (const Uri &uri) |
Returns absolute file path to uri ; an empty string if unavailable. More... | |
ResourceRetriever provides methods for testing for the existance of and accessing the content of a resource specified by URI.
|
virtualdefault |
|
pure virtual |
Returns whether the resource specified by a URI exists.
Implemented in dart::common::LocalResourceRetriever, dart::utils::DartResourceRetriever, dart::utils::PackageResourceRetriever, and dart::utils::CompositeResourceRetriever.
|
virtual |
Returns absolute file path to uri
; an empty string if unavailable.
This base class returns an empty string by default.
Reimplemented in dart::common::LocalResourceRetriever, dart::utils::PackageResourceRetriever, dart::utils::DartResourceRetriever, and dart::utils::CompositeResourceRetriever.
|
virtual |
Reads all data from the resource of uri, and returns it as a string.
[in] | uri | URI to the resource to be retrieved. |
std::runtime_error | when failed to read sucessfully. |
|
pure virtual |
Returns the resource specified by a URI or nullptr on failure.
Implemented in dart::common::LocalResourceRetriever, dart::utils::DartResourceRetriever, dart::utils::PackageResourceRetriever, and dart::utils::CompositeResourceRetriever.