Replies: 3 comments 1 reply
-
I don't understand the purpose of creating a file system backend on a non-existent root. For instance, if a user creates a backend with I would prefer to return an error instead, but this change will break the fs backend. Let's keep this issue open and see if others share the same concern. |
Beta Was this translation helpful? Give feedback.
-
Users might not create a fs backend with a non-existent root on purpose. For instance I once tested Another case is that if I run the test test_parse_fs_location locally, a dir named |
Beta Was this translation helpful? Give feedback.
-
That's true.
Actually,
This is the same issue as I statemented in last comment. Thank you for the proposal, but I don't think it's a significant enough issue to warrant a change. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/apache/incubator-opendal/blob/a04a724059d7631318cb1543382b7462190f43eb/core/src/services/fs/backend.rs#L141-L163
Currently when creating
Fs
backend, OpenDAL will always create theroot
dir even if users intend to read data from theFs
backend, which might suprise users.I propose we could create the necessary dirs in the implemetation of
Accessor::write
andAccessor::create
rather than when we are buildingFs
backend. Or at least provide users with a option to opt-out this behavior.Beta Was this translation helpful? Give feedback.
All reactions