From 85e0e991973594fb458410876a1cc09c5971b918 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Thu, 26 Jan 2017 00:32:22 +0300 Subject: Helper method for loading files. Photo upload example. Fixes #24 --- include/tgbot/tools/FileTools.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/tgbot/tools/FileTools.h (limited to 'include/tgbot/tools/FileTools.h') diff --git a/include/tgbot/tools/FileTools.h b/include/tgbot/tools/FileTools.h new file mode 100644 index 0000000..6071852 --- /dev/null +++ b/include/tgbot/tools/FileTools.h @@ -0,0 +1,25 @@ +// +// Created by Oleg on 25.01.17. +// + +#ifndef TGBOT_FILETOOLS_H +#define TGBOT_FILETOOLS_H + +#include + +/** + * @ingroup tools + */ +namespace FileTools { + +/** + * Reads whole file to string. + * @param filePath Path to a file + * @return string with file contents + */ +std::string read(const std::string& filePath); + +}; + + +#endif //TGBOT_FILETOOLS_H -- cgit v1.2.3