Xuanwo commented on code in PR #3651:
URL:
https://github.com/apache/incubator-opendal/pull/3651#discussion_r1403029188
##########
core/src/types/operator/operator.rs:
##########
@@ -158,16 +158,36 @@ impl Operator {
}
}
- /// Get current path's metadata.
+ /// Get given path's metadata.
///
/// # Notes
///
/// For fetch metadata of entries returned by [`Lister`], it's better to
use [`list_with`] and
/// [`lister_with`] with `metakey` query like `Metakey::ContentLength |
Metakey::LastModified`
- /// so that we can avoid extra requests.
+ /// so that we can avoid extra stat requests.
+ ///
+ /// # Behavior
+ ///
+ /// `test` and `test/` may vary in some services such as S3. However, on a
local file system,
+ /// they're identical. Therefore, the behavior of `stat("test")` and
`stat("test/")` might differ
+ /// in certain edge cases. Always use `stat("test/")` when you need to
access a directory if possible.
+ ///
Review Comment:
Yes, there are services that don't support `create_dir`, `stat` just treat
them as simple file. I will add comments in following PRs.
--
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]