MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
sys.h File Reference
#include <filesystem>
#include <optional>
#include <string>
Include dependency graph for sys.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mim
 
namespace  mim::sys
 

Macros

#define MIM_WHICH   "which"
 

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.
 

Macro Definition Documentation

◆ MIM_WHICH

#define MIM_WHICH   "which"

Definition at line 10 of file sys.h.

Referenced by mim::sys::find_cmd(), and main().