MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / doCreate

Function doCreate

tools/brother120tool.cc:436–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436static void doCreate(int argc, const char* argv[])
437{
438 if (argc < 3)
439 syntax();
440
441 file.open(argv[1], std::ios::out | std::ios::binary | std::ios::trunc);
442 if (!file.is_open())
443 error("cannot open output file '{}'", argv[1]);
444
445 file.seekp(SECTOR_COUNT * SECTOR_SIZE - 1, std::ifstream::beg);
446 file.put(0);
447
448 for (int i = 2; i < argc; i++)
449 insertFile(argv[i]);
450
451 writeDirectory();
452 writeAllocationTable();
453 checkConsistency();
454
455 file.close();
456}
457
458static void doExtract(int argc, const char* argv[])
459{

Callers 1

mainFunction · 0.85

Calls 9

errorFunction · 0.85
insertFileFunction · 0.85
writeDirectoryFunction · 0.85
writeAllocationTableFunction · 0.85
checkConsistencyFunction · 0.85
openMethod · 0.80
syntaxFunction · 0.70
putMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected