Thorin 1.9.0
The Higher ORder 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  thorin
 
namespace  thorin::sys
 

Macros

#define THORIN_WHICH   "which"
 

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.
 

Macro Definition Documentation

◆ THORIN_WHICH

#define THORIN_WHICH   "which"

Definition at line 10 of file sys.h.