| 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 |
nothing calls this directly
no test coverage detected