MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / readBinFile

Method readBinFile

src/Base/Reader.cpp:416–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416void Base::XMLReader::readBinFile(const char* filename)
417{
418 Base::FileInfo fi(filename);
419 Base::ofstream to(fi, std::ios::out | std::ios::binary);
420 if (!to) {
421 throw Base::FileException("XMLReader::readBinFile() Could not open file!");
422 }
423
424 bool ok {};
425 do {
426 ok = read();
427 if (!ok) {
428 break;
429 }
430 } while (ReadType != EndCDATA);
431
432 to << Base::base64_decode(Characters);
433 to.close();
434}
435
436void Base::XMLReader::readFiles(zipios::ZipInputStream& zipstream) const
437{

Callers 1

RestoreMethod · 0.80

Calls 3

base64_decodeFunction · 0.85
readFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected