opendal icon indicating copy to clipboard operation
opendal copied to clipboard

OpenDAL std::fs / tokio::fs Adapter

Open Xuanwo opened this issue 1 year ago • 1 comments

It could be intereting to provide an adapter for std::fs or tokio::fs so users can migrate to opendal as easy as:

For std::fs:

- use std::fs;
+ use opendal_std_fs;

For tokio::fs:

- use tokio::fs;
+ use opendal_tokio_fs;

There are two main issues we need to address:

  • Naming: yes, naming is of course the hardest problem.
  • Init: std::fs & tokio::fs are accessing global resources file system. But opendal needs to initiate first. We need to decide how users will use them.

Xuanwo avatar Feb 18 '24 04:02 Xuanwo

For naming:

  • In different crate: opendal_std_fs and opendal_tokio_fs.
  • In the same crate: openfal::std_fs and openfal::tokio_fs (openfal == Open File Access Layer)

Do you have other ideas?

Xuanwo avatar Feb 18 '24 08:02 Xuanwo