LocalResourceRetriever provides access to local resources specified by file:// URIs by wrapping the standard C and C++ file manipulation routines.
More...
#include <LocalResourceRetriever.hpp>
|
| virtual | ~LocalResourceRetriever ()=default |
| |
| bool | exists (const Uri &_uri) override |
| | Returns whether the resource specified by a URI exists.
|
| |
| ResourcePtr | retrieve (const Uri &_uri) override |
| | Returns the resource specified by a URI or nullptr on failure.
|
| |
| std::string | getFilePath (const Uri &uri) override |
| | Returns absolute file path to uri; an empty string if unavailable.
|
| |
| virtual std::string | readAll (const Uri &uri) |
| | Reads all data from the resource of uri, and returns it as a string.
|
| |
LocalResourceRetriever provides access to local resources specified by file:// URIs by wrapping the standard C and C++ file manipulation routines.
◆ ~LocalResourceRetriever()
| virtual dart::common::LocalResourceRetriever::~LocalResourceRetriever |
( |
| ) |
|
|
virtualdefault |
◆ exists()
| bool dart::common::LocalResourceRetriever::exists |
( |
const Uri & |
uri | ) |
|
|
overridevirtual |
◆ getFilePath()
| std::string dart::common::LocalResourceRetriever::getFilePath |
( |
const Uri & |
uri | ) |
|
|
overridevirtual |
Returns absolute file path to uri; an empty string if unavailable.
This base class returns an empty string by default.
Reimplemented from dart::common::ResourceRetriever.
◆ readAll()
| std::string dart::common::ResourceRetriever::readAll |
( |
const Uri & |
uri | ) |
|
|
virtualinherited |
Reads all data from the resource of uri, and returns it as a string.
- Parameters
-
| [in] | uri | URI to the resource to be retrieved. |
- Returns
- The string retrieved from the resource.
- Exceptions
-
| std::runtime_error | when failed to read sucessfully. |
◆ retrieve()