cuichenli commented on code in PR #5718:
URL: https://github.com/apache/opendal/pull/5718#discussion_r1987288158


##########
bindings/java/src/async_operator.rs:
##########
@@ -578,22 +581,23 @@ fn intern_list(
     op: *mut Operator,
     executor: *const Executor,
     path: JString,
+    recursive: jboolean,
 ) -> Result<jlong> {
     let op = unsafe { &mut *op };
     let id = request_id(env)?;
 
     let path = jstring_to_string(env, &path)?;
 
     executor_or_default(env, executor)?.spawn(async move {
-        let result = do_list(op, path).await;
+        let result = do_list(op, path, recursive).await;
         complete_future(id, result.map(JValueOwned::Object))
     });
 
     Ok(id)
 }
 
-async fn do_list<'local>(op: &mut Operator, path: String) -> 
Result<JObject<'local>> {
-    let obs = op.list(&path).await?;
+async fn do_list<'local>(op: &mut Operator, path: String, recursive: jboolean) 
-> Result<JObject<'local>> {
+    let obs = op.list_with(&path).recursive(recursive == JNI_TRUE).await?;

Review Comment:
   i dont know if i would have the bandwidth. it has been a while since the 
last time i touched rust 🤣 . but when trying to mimic the #5664, i do noticed 
that it is difficult to use the list_with api, i can not figure out how to pass 
the JObject to an async block. 
   
   but anyway, i will try my best to finish this one first. 



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