aboutsummaryrefslogtreecommitdiff
path: root/include/Exec.hpp
blob: 93ce307d139280dcc1429beb366ced70f5957fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef SIBS_EXEC_HPP
#define SIBS_EXEC_HPP

#include "Result.hpp"
#include "../include/FileUtil.hpp"
#include <string>

namespace sibs
{
    struct ExecResult
    {
        std::string execStdout;
        int exitCode;
    };

    Result<ExecResult> exec(const _tinydir_char_t *cmd, bool print = false);
    Result<ExecResult> exec(const FileString &cmd, bool print = false);
}

#endif //SIBS_EXEC_HPP