Function ament_index_cpp::get_resource
Defined in File get_resource.hpp
Function Documentation
-
bool ament_index_cpp::get_resource(const std::string &resource_type, const std::string &resource_name, std::string &content, std::string *prefix_path = nullptr)
Get a the content and path of a resource.
- Parameters:
resource_type – [in] type of the resource
resource_name – [in] name of the resource
content – [out] content of the resource
prefix_path – [out] the installation prefix of the given resource if found.
- Throws:
std::runtime_error – if resource_type or resource_name are empty.
- Returns:
true
is the resource exists,false
otherwise.