MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
sys.cpp File Reference
#include "mim/util/sys.h"
#include <algorithm>
#include <array>
#include <iostream>
#include <vector>
#include "mim/util/print.h"
#include <dlfcn.h>
#include <unistd.h>
Include dependency graph for sys.cpp:

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.