|
MVSim
Lightweight simulator for 2.5D vehicles and robots
|
#include <RemoteResourcesManager.h>


Public Member Functions | |
| std::string | resolve_path (const std::string &uri) |
Static Public Member Functions | |
| static bool | is_remote (const std::string &uri) |
| static std::tuple< bool, std::string, std::string > | zip_uri_split (const std::string &uri) |
| static std::string | cache_directory () |
Keeps a local directory with cached archives and packages from remote servers. The cache directory is $HOME/.cache/mvsim-storage/ in non-Windows systems.
See resolve_path() for the possible formats of URI addresses.
|
static |
Returns true if the URI starts with "http[s]://"
| std::string mvsim::RemoteResourcesManager::resolve_path | ( | const std::string & | uri | ) |
Processes an URI with the format described next, and returns a local machine URI for that file.
Possible formats for uri:
/plain/path/to/file: Then this returns the same string.file://<ACTUAL_LOCAL_PATH>: This returns the local path.https://server.org/path/file.dae: It downloads the file and returns a local path to it.https://server.org/path/package.zip/file.dae: Downloads the ZIP package, extracts
|
static |
Returns {true, zip_uri, internal_uri} if the URI refers to a ZIP file, or {false, uri, ""} otherwise.