LocalResourceRetriever provides access to local resources specified by file:// URIs by wrapping the standard C and C++ file manipulation routines.
More...
#include <LocalResourceRetriever.hpp>
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()