Functions | |
| std::optional< fs::path > | path_to_libmim () |
| Yields std::nullopt if an error occurred. | |
| std::string | exec (std::string cmd) |
Executes command cmd. | |
| std::string | find_cmd (std::string) |
| int | system (std::string) |
| Wraps std::system and makes the return value usable. | |
| int | run (std::string cmd, std::string args={}) |
Wraps sys::system and puts .exe at the back (Windows) and ./ at the front (otherwise) of cmd. | |
| std::string | escape (const std::filesystem::path &path) |
Returns the path as std::string and escapes all whitespaces with backslash. | |
| std::string mim::sys::escape | ( | const std::filesystem::path & | path | ) |
| std::string mim::sys::exec | ( | std::string | cmd | ) |
Executes command cmd.
Definition at line 83 of file sys.cpp.
References mim::error().
Referenced by find_cmd().
| std::string mim::sys::find_cmd | ( | std::string | cmd | ) |
| std::optional< fs::path > mim::sys::path_to_libmim | ( | ) |
Yields std::nullopt if an error occurred.
The returned path is adjusted so <parent>/mim resolves to the default in-tree plugin directory when possible.
Definition at line 52 of file sys.cpp.
References mim_lib_anchor().
Referenced by mim::Driver::Driver().
| int mim::sys::run | ( | std::string | cmd, |
| std::string | args = {} ) |
Wraps sys::system and puts .exe at the back (Windows) and ./ at the front (otherwise) of cmd.
Definition at line 107 of file sys.cpp.
References system().