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

Method DumpFiles

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

Source from the content-addressed store, hash-verified

365 }
366
367 void DumpFiles(const std::string& prefix, const Directory& dir,
368 std::vector<MockFileInfo>* out) {
369 std::string path = prefix + dir.name;
370 if (!path.empty()) {
371 path += "/";
372 }
373 for (const auto& pair : dir.entries) {
374 Entry* child = pair.second.get();
375 if (child->is_file()) {
376 auto& file = child->as_file();
377 out->push_back({path + file.name, file.mtime, std::string_view(file)});
378 } else if (child->is_dir()) {
379 DumpFiles(path, child->as_dir(), out);
380 }
381 }
382 }
383
384 Result<std::shared_ptr<io::OutputStream>> OpenOutputStream(
385 const std::string& path, bool append,

Callers 1

AllFilesMethod · 0.80

Calls 5

is_fileMethod · 0.80
push_backMethod · 0.80
is_dirMethod · 0.80
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected