MCPcopy Create free account
hub / github.com/comaps/comaps / AppendFileToFile

Function AppendFileToFile

libs/coding/internal/file_data.cpp:252–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252void AppendFileToFile(string const & fromFilename, string const & toFilename)
253{
254 ifstream from;
255 from.exceptions(fstream::failbit | fstream::badbit);
256 from.open(fromFilename, ios::binary);
257
258 ofstream to;
259 to.exceptions(fstream::badbit);
260 to.open(toFilename, ios::binary | ios::app);
261
262 auto * buffer = from.rdbuf();
263 if (!IsEOF(from))
264 to << buffer;
265}
266
267bool CopyFileX(string const & fOld, string const & fNew)
268{

Callers 5

MergeIntoMethod · 0.85
MergeIntoMethod · 0.85
MergeIntoMethod · 0.85
MergeIntoMethod · 0.85
MergeIntoMethod · 0.85

Calls 2

IsEOFFunction · 0.85
openMethod · 0.80

Tested by

no test coverage detected