MCPcopy Create free account
hub / github.com/apache/arrow / GetFileInfoGenerator

Method GetFileInfoGenerator

cpp/src/arrow/filesystem/mockfs.cc:798–810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

796}
797
798FileInfoGenerator MockAsyncFileSystem::GetFileInfoGenerator(const FileSelector& select) {
799 auto maybe_infos = GetFileInfo(select);
800 if (maybe_infos.ok()) {
801 // Return the FileInfo entries one by one
802 const auto& infos = *maybe_infos;
803 std::vector<FileInfoVector> chunks(infos.size());
804 std::transform(infos.begin(), infos.end(), chunks.begin(),
805 [](const FileInfo& info) { return FileInfoVector{info}; });
806 return MakeVectorGenerator(std::move(chunks));
807 } else {
808 return MakeFailingGenerator(maybe_infos);
809 }
810}
811
812} // namespace internal
813} // namespace fs

Callers

nothing calls this directly

Calls 6

MakeVectorGeneratorFunction · 0.85
MakeFailingGeneratorFunction · 0.85
okMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected