MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / loadXtc

Method loadXtc

src/activities/reader/ReaderActivity.cpp:46–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46std::unique_ptr<Xtc> ReaderActivity::loadXtc(const std::string& path) {
47 if (!Storage.exists(path.c_str())) {
48 LOG_ERR("READER", "File does not exist: %s", path.c_str());
49 return nullptr;
50 }
51
52 auto xtc = makeUniqueNoThrow<Xtc>(path, "/.crosspoint");
53 if (!xtc) {
54 LOG_ERR("READER", "Failed to allocate XTC object");
55 return nullptr;
56 }
57 if (xtc->load()) {
58 return xtc;
59 }
60
61 LOG_ERR("READER", "Failed to load XTC");
62 return nullptr;
63}
64
65std::unique_ptr<Txt> ReaderActivity::loadTxt(const std::string& path) {
66 if (!Storage.exists(path.c_str())) {

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected