diff options
Diffstat (limited to 'src/Conf.cpp')
-rw-r--r-- | src/Conf.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp new file mode 100644 index 0000000..d535c60 --- /dev/null +++ b/src/Conf.cpp @@ -0,0 +1,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)); + } +}
\ No newline at end of file |