| 22 | using namespace WasmVM; |
| 23 | |
| 24 | static std::pair<std::filesystem::path, std::optional<std::filesystem::path>> parse_create_path(std::string str){ |
| 25 | static const std::regex path_regex("([^:]*)(:(.*))?"); |
| 26 | std::smatch path_match; |
| 27 | if(std::regex_match(str, path_match, path_regex)){ |
| 28 | std::pair<std::filesystem::path, std::optional<std::filesystem::path>> result; |
| 29 | result.first = path_match[1].str(); |
| 30 | if(path_match[2].length() > 0){ |
| 31 | result.second = path_match[3].str(); |
| 32 | } |
| 33 | return result; |
| 34 | }else{ |
| 35 | throw Exception::Exception("invalid argument"); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | struct CreateConfig { |
| 40 |
no test coverage detected