MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Pack

Method Pack

apps/tools/Tools/commands/PboCommand.cpp:470–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468 remove(outputPbo.c_str());
469
470 std::cout << "Packing " << srcDir << " -> " << outputPbo;
471 if (compress)
472 std::cout << " (compressed)";
473 std::cout << std::endl;
474
475 FileBankManager mgr;
476 LSError result = mgr.Create(outputPbo.c_str(), srcDir.c_str(), compress);
477 if (result != LSOK)
478 {
479 std::cerr << "Error: Failed to create PBO" << std::endl;
480 return 1;
481 }
482
483 if (stat(outputPbo.c_str(), &st) != 0)
484 {
485 std::cerr << "Error: Output file was not created" << std::endl;
486 return 1;
487 }
488
489 std::cout << "Created " << outputPbo << " (" << Poseidon::FormatSize(st.st_size) << ")" << std::endl;
490 return 0;
491}
492
493} // namespace PoseidonTools

Callers

nothing calls this directly

Calls 3

FormatSizeFunction · 0.85
statClass · 0.70
CreateMethod · 0.45

Tested by

no test coverage detected