Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eframe: expose means of writing files to the file-storage directory location #3134

Open
jleibs opened this issue Jul 4, 2023 · 0 comments
Open

Comments

@jleibs
Copy link
Contributor

jleibs commented Jul 4, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants