Ji-Xinyou commented on code in PR #3515:
URL:
https://github.com/apache/incubator-opendal/pull/3515#discussion_r1385607488
##########
bindings/c/src/metadata.rs:
##########
@@ -111,4 +111,24 @@ impl opendal_metadata {
// The use-after-free is undefined behavior
unsafe { (*self.inner).is_dir() }
}
+
+ /// \brief Return the last_modified of the metadata
+ ///
+ /// # Example
+ /// ```C
+ /// // ... previously you wrote "Hello, World!" to path "/testpath"
+ /// opendal_result_stat s = opendal_operator_stat(ptr, "/testpath");
+ /// assert(s.error == NULL);
+ ///
+ /// opendal_metadata *meta = s.meta;
+ /// assert(opendal_metadata_last_modified(meta) != -1);
+ /// ```
+ #[no_mangle]
+ pub extern "C" fn opendal_metadata_last_modified(&self) -> i64 {
Review Comment:
I suggest rather add the unit of time on the function name or on the
documentation, is it s/ms/us, etc.
##########
bindings/c/tests/bdd.cpp:
##########
@@ -111,6 +115,16 @@ TEST_F(OpendalBddTest, FeatureTest)
EXPECT_EQ(error, nullptr);
opendal_bytes_free(r.data);
+
+ // The directory "tmpdir/" should exist and should be a directory
+ error = opendal_operator_create_dir(this->p, "tmpdir/");
+ EXPECT_EQ(error, nullptr);
+ auto stat = opendal_operator_stat(this->p, "tempdir/");
Review Comment:
This seems to be a typo
--
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]