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


##########
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:
   Then I'd suggest we follow a way as in 
https://github.com/apache/opendal/pull/5664



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