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

Method GatherInfos

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

Source from the content-addressed store, hash-verified

336 }
337
338 void GatherInfos(const FileSelector& select, const std::string& base_path,
339 const Directory& base_dir, int32_t nesting_depth,
340 std::vector<FileInfo>* infos) {
341 for (const auto& pair : base_dir.entries) {
342 Entry* child = pair.second.get();
343 infos->push_back(child->GetInfo(base_path));
344 if (select.recursive && nesting_depth < select.max_recursion && child->is_dir()) {
345 Directory& child_dir = child->as_dir();
346 std::string child_path = infos->back().path();
347 GatherInfos(select, std::move(child_path), child_dir, nesting_depth + 1, infos);
348 }
349 }
350 }
351
352 void DumpDirs(const std::string& prefix, const Directory& dir,
353 std::vector<MockDirInfo>* out) {

Callers 1

GetFileInfoMethod · 0.80

Calls 6

push_backMethod · 0.80
is_dirMethod · 0.80
backMethod · 0.80
getMethod · 0.45
GetInfoMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected