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


##########
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:
   If @cuichenli is interested, we can implement 
https://github.com/apache/opendal/discussions/5674 first. This will make adding 
such features much easier.



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