Xuanwo commented on code in PR #2736:
URL:
https://github.com/apache/incubator-opendal/pull/2736#discussion_r1280609953
##########
bin/oay/src/services/webdav/webdavfs.rs:
##########
@@ -48,11 +52,27 @@ impl DavFileSystem for WebdavFs {
fn read_dir<'a>(
&'a self,
- _path: &'a dav_server::davpath::DavPath,
+ path: &'a dav_server::davpath::DavPath,
_meta: dav_server::fs::ReadDirMeta,
) -> dav_server::fs::FsFuture<dav_server::fs::FsStream<Box<dyn
dav_server::fs::DavDirEntry>>>
{
- todo!()
+ async move {
+ let path = path.as_url_string();
+ let mut lister = self.op.list(path.as_str()).await.unwrap();
Review Comment:
The code logic here will collect all items into vec and than transformed
into stream again. How about implement `dav_server::fs::FsStream` directly? We
can add a newtype like `DevStream(Lister)` and `impl FsStream for DevStream`.
--
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]