eframe: expose means of writing files to the file-storage directory location
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Is your feature request related to a problem? Please describe.**
I am trying to store medium-sized binary files (not just serde) alongside the application state. I'd like to put them in the same directory where `FileStorage` is going to store other application state though.
**Describe the solution you'd like**
Option 1: Storage could expose a `get_path` API. This would be easier, though presents complications when running on web.
Option 2: Storage could expose an API like:
```
fn write_file(&mut self, key: &str, writer: FnOnce(impl std::io::Write));
fn read_file(&mut self, key: &str, reader: FnOnce(impl std::io::Read));
```
on web this probably needs to be backed by IndexedDB or OPFS.
Contributor guide
Research direction
Start by locating the FileStorage implementation and reviewing how its native file-storage directory is selected. Compare the proposed get_path and write_file/read_file APIs, including the stated web constraints around IndexedDB or OPFS; done means a decided, cross-platform storage interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100