MCPcopy Create free account
hub / github.com/bytedance/bolt / restoreVectorFromFile

Function restoreVectorFromFile

bolt/vector/VectorSaver.cpp:693–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691}
692
693VectorPtr restoreVectorFromFile(
694 const char* FOLLY_NONNULL filePath,
695 memory::MemoryPool* FOLLY_NONNULL pool) {
696 std::ifstream inputFile(filePath, std::ifstream::binary);
697 BOLT_CHECK(!inputFile.fail(), "Cannot open file: {}", filePath);
698
699 auto result = restoreVector(inputFile, pool);
700 inputFile.close();
701 return result;
702}
703
704std::string restoreStringFromFile(const char* FOLLY_NONNULL filePath) {
705 std::ifstream inputFile(filePath, std::ifstream::binary);

Callers 2

runMethod · 0.85
TEST_FFunction · 0.85

Calls 2

restoreVectorFunction · 0.85
closeMethod · 0.45

Tested by 2

runMethod · 0.68
TEST_FFunction · 0.68