opendal icon indicating copy to clipboard operation
opendal copied to clipboard

`Operator::lister` is not exported for Node.js binding

Open fenprace opened this issue 1 year ago • 7 comments

According to bindings/nodejs/src/lib.rs it seems Operator::lister is not exposed by the Node.js binding.

Is there any particular reason of not doing that? Since Lister is already exported. Or is it something we will have in the future?

list_with and lister_with are not exported as well.

fenprace avatar Apr 19 '24 09:04 fenprace

The original reason is related to https://github.com/apache/opendal/issues/1533. But I think it's fine to expose lister first.

Xuanwo avatar Apr 19 '24 09:04 Xuanwo

The original reason is related to #1533. But I think it's fine to expose lister first.

Awesome! Will like to see this!

BTW, is it similar to the reason why Entry::metadata is not exposed?

Though the documentation says:

Use stat if you:

  • Want detect the outside changes of path.
  • Don’t want to read from cached metadata.

You may want to use metadata if you are working with entries returned by Lister. It’s highly possible that metadata you want has already been cached.

Since Entry::metadata is not exposed, I guess there's currently no way to access cached metadata?

fenprace avatar Apr 19 '24 10:04 fenprace

BTW, is it similar to the reason why Entry::metadata is not exposed?

I suspect this feature doesn't exist because no one takes this task. Would you like to take a look?

Xuanwo avatar Apr 19 '24 11:04 Xuanwo

Thank you for your interest in our nodejs binding! I will expose it later.

suyanhanx avatar Apr 19 '24 13:04 suyanhanx

cc @fenprace, are you interested in implementing this?

Xuanwo avatar Sep 09 '24 14:09 Xuanwo

cc @fenprace, are you interested in implementing this?

Well, I will check the codebase and give it a try. But I can't make any promises at the moment. I'm new to this and have never done anything serious with rust.

fenprace avatar Sep 09 '24 14:09 fenprace

Well, I will check the codebase and give it a try.

Thank you!

But I can't make any promises at the moment.

That's how open source works. Thanks for you time anyway.

I'm new to this and have never done anything serious with rust.

Please let me know if you have met blocks.

Xuanwo avatar Sep 09 '24 15:09 Xuanwo