manuel-woelker / rust-vfs

A virtual filesystem for Rust
Apache License 2.0
384 stars 44 forks source link

Readonly Filesystem #58

Open seanaye opened 1 year ago

seanaye commented 1 year ago

Separate the FileSystem trait and AynscFileSystem trait into ReadOnlyFileSystem and WriteOnlyFileSystem.

abherer-constant commented 10 months ago

I am also interested in this feature. If this is desirable, I can draft a PR. If we were to split the trait between readand write operations, it could be worthwhile to also consider making directory operations there own trait to better support flat filesystems.

An alternative option that would avoid creating a breaking change would be to create a wrapper filesystem that blocks any undesirable method calls. The downside is that these checks would be done at runtime.