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

Should FileProperties::files be a Vec<String>? #22

Open
unbrice opened this issue Sep 10, 2021 · 0 comments
Open

Should FileProperties::files be a Vec<String>? #22

unbrice opened this issue Sep 10, 2021 · 0 comments

Comments

@unbrice
Copy link

unbrice commented Sep 10, 2021

Currently the files property of ybc::FileProperties is a Vec<web_sys::File>.
This is slightly inconvenient, because in order to read the file, one need to hand it over eg to a ReaderService, at which point ybc::FileProperties can no longer own it.

Of the whole web_sys::File object, only the name seems in use. If instead of files, ybc::FileProperties contained a file_names: Vec<String>, ownership wouldn't be an issue anymore.

Thus I offer to add a file_names property to ybc::FileProperties. files would stay for compatibility. Its content would appended to the list, after elements from file_names.
Does that sound reasonable? If yes, I'll be happy to send you a pull request.

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

1 participant