8 #include "fwTest/File.hpp" 10 #include <boost/filesystem/path.hpp> 16 bool File::contentEquals(const ::boost::filesystem::path &lfile, const ::boost::filesystem::path &rfile)
19 const streambuf::int_type eof = streambuf::traits_type::eof();
21 std::ifstream lstream(lfile.c_str());
22 std::ifstream rstream(rfile.c_str());
24 streambuf * lbuf = lstream.rdbuf();
25 streambuf * rbuf = rstream.rdbuf();
30 lchar = lbuf->sbumpc();
31 rchar = rbuf->sbumpc();
33 if (lchar == eof && rchar == eof)
38 if (lchar != rchar || lchar == eof || rchar == eof )