This is an automated email from the ASF dual-hosted git repository. xuanwo pushed a commit to branch polish-comments in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
commit 01412cb4e02d91b28755c5bd2ff7f09d4bc0a0c9 Author: Xuanwo <[email protected]> AuthorDate: Thu Nov 23 16:56:14 2023 +0800 Fix doc Signed-off-by: Xuanwo <[email protected]> --- core/src/types/operator/blocking_operator.rs | 16 ++++++++++++++++ core/src/types/operator/operator.rs | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/core/src/types/operator/blocking_operator.rs b/core/src/types/operator/blocking_operator.rs index a4165fd10..f811eeedb 100644 --- a/core/src/types/operator/blocking_operator.rs +++ b/core/src/types/operator/blocking_operator.rs @@ -152,6 +152,8 @@ impl BlockingOperator { /// /// # Behavior /// + /// ## Services that support `create_dir` + /// /// `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. @@ -168,6 +170,12 @@ impl BlockingOperator { /// /// Refer to [RFC: List Prefix][crate::docs::rfcs::rfc_3243_list_prefix] for more details. /// + /// ## Services that not support `create_dir` + /// + /// For services that not support `create_dir`, `stat("test/")` will return `NotFound` even + /// when `test/abc` exists since the service won't have the concept of dir. There is nothing + /// we can do about this. + /// /// # Examples /// /// ## Check if file exists @@ -201,6 +209,8 @@ impl BlockingOperator { /// /// # Behavior /// + /// ## Services that support `create_dir` + /// /// `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. @@ -217,6 +227,12 @@ impl BlockingOperator { /// /// Refer to [RFC: List Prefix][crate::docs::rfcs::rfc_3243_list_prefix] for more details. /// + /// ## Services that not support `create_dir` + /// + /// For services that not support `create_dir`, `stat("test/")` will return `NotFound` even + /// when `test/abc` exists since the service won't have the concept of dir. There is nothing + /// we can do about this. + /// /// # Examples /// /// ## Get metadata while `ETag` matches diff --git a/core/src/types/operator/operator.rs b/core/src/types/operator/operator.rs index 7ca46cfb7..c0f08d515 100644 --- a/core/src/types/operator/operator.rs +++ b/core/src/types/operator/operator.rs @@ -168,6 +168,8 @@ impl Operator { /// /// # Behavior /// + /// ## Services that support `create_dir` + /// /// `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. @@ -184,6 +186,12 @@ impl Operator { /// /// Refer to [RFC: List Prefix][crate::docs::rfcs::rfc_3243_list_prefix] for more details. /// + /// ## Services that not support `create_dir` + /// + /// For services that not support `create_dir`, `stat("test/")` will return `NotFound` even + /// when `test/abc` exists since the service won't have the concept of dir. There is nothing + /// we can do about this. + /// /// # Examples /// /// ## Check if file exists @@ -218,6 +226,8 @@ impl Operator { /// /// # Behavior /// + /// ## Services that support `create_dir` + /// /// `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. @@ -234,6 +244,12 @@ impl Operator { /// /// Refer to [RFC: List Prefix][crate::docs::rfcs::rfc_3243_list_prefix] for more details. /// + /// ## Services that not support `create_dir` + /// + /// For services that not support `create_dir`, `stat("test/")` will return `NotFound` even + /// when `test/abc` exists since the service won't have the concept of dir. There is nothing + /// we can do about this. + /// /// # Examples /// /// ## Get metadata while `ETag` matches
