// IO functions.
//===----------------------------------------------------------------------===//
#include "FuzzerInternal.h"
+#include <iostream>
+#include <iterator>
#include <fstream>
#include <dirent.h>
namespace fuzzer {
std::istreambuf_iterator<char>());
}
+void CopyFileToErr(const std::string &Path) {
+ std::ifstream T(Path);
+ std::copy(std::istreambuf_iterator<char>(T), std::istreambuf_iterator<char>(),
+ std::ostream_iterator<char>(std::cerr, ""));
+}
+
void WriteToFile(const Unit &U, const std::string &Path) {
std::ofstream OF(Path);
OF.write((const char*)U.data(), U.size());