aboutsummaryrefslogtreecommitdiff
path: root/src/Conf.cpp
blob: d535c60587a91d1a7ce8c62c9bde7ab4c0a76ccb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "../include/Conf.hpp"
#include "../include/FileUtil.hpp"

using namespace std;

namespace sibs
{
    Result<string> readConf(const char *filepath)
    {
        Result<string> fileContentResult = getFileContent(filepath);
        if(fileContentResult.isErr())
            return fileContentResult;

        string configData;
        printf("file content:\n%s\n", fileContentResult.unwrap().c_str());
        return Result<string>::Ok(std::move(configData));
    }
}