felipecrv commented on code in PR #40147:
URL: https://github.com/apache/arrow/pull/40147#discussion_r1513125979


##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -2145,7 +2166,10 @@ class S3FileSystem::Impl : public 
std::enable_shared_from_this<S3FileSystem::Imp
           child_path_ss << bucket << kSep << child_key;
           child_key = child_path_ss.str();
           if (obj.GetSize() > 0 || !had_trailing_slash) {
-            // We found a real file
+            // We found a real file.
+            // XXX Ideally, for 0-sized files we would also check the 
Content-Type
+            // against kAwsDirectoryContentType, but ListObjectsV2 does not 
give
+            // that information.

Review Comment:
   `GetFileInfo` has the following post-condition:
   
   If path has trailing slash, then result is either `FileType::kDirectory` or 
`FileType::kNotFound` [1]. You would break that by returning `kFile` for paths 
containing trailing slashes.
   
   > I don't think we plan to support Move because, last I looked, S3 didn't 
support a native move operation.
   
   Technically, it doesn't support any directory operation, but the file system 
implementation is supposed to be a layer that implements filesytem semantics on 
top of it. Even a filesystem `stat` can't be mapped directly to S3 operations.
   
   [1] 
https://github.com/apache/arrow/blob/main/cpp/src/arrow/filesystem/localfs.cc#L169



-- 
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