anjakefala commented on code in PR #34170:
URL: https://github.com/apache/arrow/pull/34170#discussion_r1179653321


##########
cpp/src/arrow/filesystem/localfs.cc:
##########
@@ -212,6 +213,26 @@ Result<FileInfo> StatFile(const std::string& path) {
 
 #endif
 
+Result<FileInfo> IdentifyFile(const std::filesystem::path path) {
+  FileInfo info;
+
+  if (std::filesystem::is_directory(path)) {
+    info.set_type(FileType::Directory);
+  } else if (std::filesystem::is_regular_file(path) ||
+             std::filesystem::is_symlink(path)) {
+    info.set_type(FileType::File);
+  } else {
+    info.set_type(FileType::Unknown);
+  }
+
+  info.set_mtime(kNoTime);
+  info.set_size(kNoSize);
+  // TODO does it need to be wstring in windows?

Review Comment:
   This is a draft! Part of the goal was to ensure all TODOs were addressed 
before merging. But, I wanted to communicate the work that I knew remained.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to