Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
sys.cpp File Reference
#include "thorin/util/sys.h"
#include <algorithm>
#include <array>
#include <iostream>
#include <vector>
#include "thorin/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  thorin
 
namespace  thorin::sys
 

Functions

std::optional< fs::path > thorin::sys::path_to_curr_exe ()
 Yields std::nullopt if an error occurred.
 
std::string thorin::sys::exec (std::string cmd)
 Executes command cmd.
 
std::string thorin::sys::find_cmd (std::string)
 
int thorin::sys::system (std::string)
 Wraps std::system and makes the return value usable.
 
int thorin::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.