|
MimIR 0.1
MimIR is my Intermediate Representation
|
#include "mim/util/sys.h"#include <algorithm>#include <array>#include <filesystem>#include <iostream>#include <vector>#include "mim/util/print.h"#include <dlfcn.h>#include <unistd.h>Go to the source code of this file.
Namespaces | |
| namespace | mim |
| namespace | mim::sys |
Functions | |
| std::optional< fs::path > | mim::sys::path_to_curr_exe () |
Yields std::nullopt if an error occurred. | |
| std::string | mim::sys::exec (std::string cmd) |
Executes command cmd. | |
| std::string | mim::sys::find_cmd (std::string) |
| int | mim::sys::system (std::string) |
Wraps std::system and makes the return value usable. | |
| 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. | |
| std::string | mim::sys::escape (const std::filesystem::path &path) |
Returns the path as std::string and escapes all whitespaces with backslash. | |