diff --git a/src/slurp.cc b/src/slurp.cc deleted file mode 100644 index a1f4436..0000000 --- a/src/slurp.cc +++ /dev/null @@ -1,21 +0,0 @@ -// This file is under GNU General Public License 3.0 -// see LICENSE.txt - -#include "slurp.hh" -#include -#include -#include - -namespace pEp { - std::string slurp(const std::string& filename) - { - std::ifstream input(filename.c_str(), std::ios_base::binary); - if (!input) { - throw std::runtime_error("Cannot read file \"" + filename + "\"! "); - } - - std::stringstream sstr; - sstr << input.rdbuf(); - return sstr.str(); - } -} // end of namespace pEp diff --git a/src/slurp.hh b/src/slurp.hh deleted file mode 100644 index 66d45c2..0000000 --- a/src/slurp.hh +++ /dev/null @@ -1,16 +0,0 @@ -// This file is under GNU General Public License 3.0 -// see LICENSE.txt - -#ifndef LIBPEPADAPTER_LIB_SLURP_HH -#define LIBPEPADAPTER_LIB_SLURP_HH - -#include - -namespace pEp { - // reads a whole file and returns it as std::string - // throws std::runtime_error() if the file cannot be read. Empty file is not an error. - std::string slurp(const std::string& filename); - -} // end of namespace pEp - -#endif // LIBPEPADAPTER_LIB_SLURP_HH \ No newline at end of file