diff --git a/userspace/engine/falco_engine.cpp b/userspace/engine/falco_engine.cpp index 41375313..8ed174ea 100644 --- a/userspace/engine/falco_engine.cpp +++ b/userspace/engine/falco_engine.cpp @@ -891,17 +891,6 @@ std::shared_ptr falco_engine::ruleset_for_source(std::size_t sou return source->ruleset; } -void falco_engine::read_file(const std::string &filename, std::string &contents) { - std::ifstream is; - - is.open(filename); - if(!is.is_open()) { - throw falco_exception("Could not open " + filename + " for reading"); - } - - contents.assign(std::istreambuf_iterator(is), std::istreambuf_iterator()); -} - static bool check_plugin_requirement_alternatives( const std::vector &plugins, const rule_loader::plugin_version_info::requirement_alternatives &alternatives, diff --git a/userspace/engine/falco_engine.h b/userspace/engine/falco_engine.h index 6d4e5ac7..b1b9bda2 100644 --- a/userspace/engine/falco_engine.h +++ b/userspace/engine/falco_engine.h @@ -378,9 +378,6 @@ private: filter_ruleset::engine_state_funcs m_engine_state; - // Throws falco_exception if the file can not be read - void read_file(const std::string &filename, std::string &contents); - indexed_vector m_sources; inline const falco_source *find_source(std::size_t index) {