+bool open_url(const std::string &url)
+{
+ if (url.substr(0, 7) != "http://" && url.substr(0, 8) != "https://") {
+ errorstream << "Unable to open browser as URL is missing schema: " << url << std::endl;
+ return false;
+ }
+
+ return open_uri(url);
+}
+
+bool open_directory(const std::string &path)
+{
+ if (!fs::IsDir(path)) {
+ errorstream << "Unable to open directory as it does not exist: " << path << std::endl;
+ return false;
+ }
+
+ return open_uri(path);
+}
+