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

Function DiscoverFilesFromDir

cpp/src/arrow/engine/substrait/relation_internal.cc:280–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280Status DiscoverFilesFromDir(const std::shared_ptr<fs::LocalFileSystem>& local_fs,
281 const std::string& dirpath,
282 std::vector<fs::FileInfo>* rel_fpaths) {
283 // Define a selector for a recursive descent
284 fs::FileSelector selector;
285 selector.base_dir = dirpath;
286 selector.recursive = true;
287
288 ARROW_ASSIGN_OR_RAISE(auto file_infos, local_fs->GetFileInfo(selector));
289 for (auto& file_info : file_infos) {
290 if (file_info.IsFile()) {
291 rel_fpaths->push_back(std::move(file_info));
292 }
293 }
294
295 return Status::OK();
296}
297
298} // namespace
299

Callers 1

FromProtoFunction · 0.85

Calls 3

IsFileMethod · 0.80
push_backMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected