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

Function GetAllWithType

cpp/src/arrow/filesystem/test_util.cc:47–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45namespace {
46
47std::vector<FileInfo> GetAllWithType(FileSystem* fs, FileType type) {
48 FileSelector selector;
49 selector.base_dir = "";
50 selector.recursive = true;
51 std::vector<FileInfo> infos = std::move(fs->GetFileInfo(selector)).ValueOrDie();
52 std::vector<FileInfo> result;
53 for (const auto& info : infos) {
54 if (info.type() == type) {
55 result.push_back(info);
56 }
57 }
58 return result;
59}
60
61std::vector<FileInfo> GetAllDirs(FileSystem* fs) {
62 return GetAllWithType(fs, FileType::Directory);

Callers 2

GetAllDirsFunction · 0.85
GetAllFilesFunction · 0.85

Calls 4

ValueOrDieMethod · 0.80
push_backMethod · 0.80
GetFileInfoMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected