@@ -127,25 +127,25 @@ Result<fs::PathForest> FileSystemDatasetFactory::Filter(
127127 const std::shared_ptr<fs::FileSystem>& filesystem,
128128 const std::shared_ptr<FileFormat>& format, const FileSystemFactoryOptions& options,
129129 fs::PathForest forest) {
130- fs::FileStatsVector out;
130+ std::vector< fs::FileInfo> out;
131131
132- auto & stats = forest.stats ();
132+ auto & infos = forest.infos ();
133133 RETURN_NOT_OK (forest.Visit ([&](fs::PathForest::Ref ref) -> fs::PathForest::MaybePrune {
134- const auto & path = ref.stats ().path ();
134+ const auto & path = ref.info ().path ();
135135
136136 if (StartsWithAnyOf (options.ignore_prefixes , path)) {
137137 return fs::PathForest::Prune;
138138 }
139139
140- if (ref.stats ().IsFile () && options.exclude_invalid_files ) {
140+ if (ref.info ().IsFile () && options.exclude_invalid_files ) {
141141 ARROW_ASSIGN_OR_RAISE (auto supported,
142142 format->IsSupported (FileSource (path, filesystem.get ())));
143143 if (!supported) {
144144 return fs::PathForest::Continue;
145145 }
146146 }
147147
148- out.push_back (std::move (stats [ref.i ]));
148+ out.push_back (std::move (infos [ref.i ]));
149149 return fs::PathForest::Continue;
150150 }));
151151
@@ -155,25 +155,25 @@ Result<fs::PathForest> FileSystemDatasetFactory::Filter(
155155Result<std::shared_ptr<DatasetFactory>> FileSystemDatasetFactory::Make (
156156 std::shared_ptr<fs::FileSystem> filesystem, const std::vector<std::string>& paths,
157157 std::shared_ptr<FileFormat> format, FileSystemFactoryOptions options) {
158- ARROW_ASSIGN_OR_RAISE (auto files, filesystem->GetTargetStats (paths));
158+ ARROW_ASSIGN_OR_RAISE (auto files, filesystem->GetTargetInfos (paths));
159159 ARROW_ASSIGN_OR_RAISE (auto forest, fs::PathForest::Make (std::move (files)));
160160
161- std::unordered_set<fs::FileStats , fs::FileStats ::ByPath> missing;
161+ std::unordered_set<fs::FileInfo , fs::FileInfo ::ByPath> missing;
162162 DCHECK_OK (forest.Visit ([&](fs::PathForest::Ref ref) {
163163 util::string_view parent_path = options.partition_base_dir ;
164164 if (auto parent = ref.parent ()) {
165- parent_path = parent.stats ().path ();
165+ parent_path = parent.info ().path ();
166166 }
167167
168168 for (auto && path :
169- fs::internal::AncestorsFromBasePath (parent_path, ref.stats ().path ())) {
170- ARROW_ASSIGN_OR_RAISE (auto file, filesystem->GetTargetStats (std::move (path)));
169+ fs::internal::AncestorsFromBasePath (parent_path, ref.info ().path ())) {
170+ ARROW_ASSIGN_OR_RAISE (auto file, filesystem->GetTargetInfo (std::move (path)));
171171 missing.insert (std::move (file));
172172 }
173173 return Status::OK ();
174174 }));
175175
176- files = std::move (forest).stats ();
176+ files = std::move (forest).infos ();
177177 std::move (missing.begin (), missing.end (), std::back_inserter (files));
178178
179179 ARROW_ASSIGN_OR_RAISE (forest, fs::PathForest::Make (std::move (files)));
@@ -187,7 +187,7 @@ Result<std::shared_ptr<DatasetFactory>> FileSystemDatasetFactory::Make(
187187Result<std::shared_ptr<DatasetFactory>> FileSystemDatasetFactory::Make (
188188 std::shared_ptr<fs::FileSystem> filesystem, fs::FileSelector selector,
189189 std::shared_ptr<FileFormat> format, FileSystemFactoryOptions options) {
190- ARROW_ASSIGN_OR_RAISE (auto files, filesystem->GetTargetStats (selector));
190+ ARROW_ASSIGN_OR_RAISE (auto files, filesystem->GetTargetInfos (selector));
191191
192192 ARROW_ASSIGN_OR_RAISE (auto forest, fs::PathForest::Make (std::move (files)));
193193
@@ -210,9 +210,9 @@ Result<std::shared_ptr<Schema>> FileSystemDatasetFactory::PartitionSchema() {
210210 }
211211
212212 std::vector<util::string_view> paths;
213- for (const auto & stats : forest_.stats ()) {
213+ for (const auto & info : forest_.infos ()) {
214214 if (auto relative =
215- fs::internal::RemoveAncestor (options_.partition_base_dir , stats .path ())) {
215+ fs::internal::RemoveAncestor (options_.partition_base_dir , info .path ())) {
216216 paths.push_back (*relative);
217217 }
218218 }
@@ -223,7 +223,7 @@ Result<std::shared_ptr<Schema>> FileSystemDatasetFactory::PartitionSchema() {
223223Result<std::vector<std::shared_ptr<Schema>>> FileSystemDatasetFactory::InspectSchemas () {
224224 std::vector<std::shared_ptr<Schema>> schemas;
225225
226- for (const auto & f : forest_.stats ()) {
226+ for (const auto & f : forest_.infos ()) {
227227 if (!f.IsFile ()) continue ;
228228 FileSource src (f.path (), fs_.get ());
229229 ARROW_ASSIGN_OR_RAISE (auto schema, format_->Inspect (src));
@@ -259,7 +259,7 @@ Result<std::shared_ptr<Dataset>> FileSystemDatasetFactory::Finish(
259259 // apply partitioning to forest to derive partitions
260260 auto apply_partitioning = [&](fs::PathForest::Ref ref) {
261261 if (auto relative = fs::internal::RemoveAncestor (options_.partition_base_dir ,
262- ref.stats ().path ())) {
262+ ref.info ().path ())) {
263263 auto segments = fs::internal::SplitAbstractPath (relative->to_string ());
264264
265265 if (segments.size () > 0 ) {
0 commit comments