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
Support filtering of file dialog #893
Comments
Why does it not support selecting folders or multiple files |
Because that is a lot more complicated to do across all platforms. |
Opened #941 |
In a slack conversation I posted this as a conversation piece, thought I would post it here too.
|
I like it - it gives a lot of flexibility. The only limitation is fyne.File - you can only make a filefilter based on Name/URI, you can't for example make a filter based on the file size. However that is not a typical use case, and we can always extend fyne.File in future. I think your proposal covers most use cases well. |
A bummer just realised it will have to be URI (string) only because we moved away from fyne.File to fyne.FileReadCloser - we cannot pass them around as they are literally pointers into files. |
Could I ask why we are needing to create a fyne.File / fyne.FileReadCloser as opposed to being able to use os.File / io.Filexxxxx ? |
Look at all of the functionality on os.File - a lot of that is not possible in the cross platform (esp mobile) environments. our FileReadCloser can be used in place of any os.ReadCloser so it's not as buig a deal as it seems. |
Update vendored mobile driver. Export the file filter types so we can work with them. Also tidy up extension handling a little. And remove excess demo buttons from Windows tab. Fixes fyne-io#893
Good hussle, thanks @okratitan :) This is now on develop for testing |
I noticed Line 30 in 550fbc9
|
Probably filter by mime type - this will need to be translated to other mobile specific approaches for iOS, Android.
Provide standard filterings, but maybe the ability to pass a function for more specific filtering...
The text was updated successfully, but these errors were encountered: