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

Expand GLOB pattern capability on FilePickerFileType #17934

Open
MajesticBevans opened this issue Jan 9, 2025 · 1 comment
Open

Expand GLOB pattern capability on FilePickerFileType #17934

MajesticBevans opened this issue Jan 9, 2025 · 1 comment

Comments

@MajesticBevans
Copy link

Is your feature request related to a problem? Please describe.

As far as I understand it, FilePickerFileType currently only recognises the * wildcard character, rather than the other possibilities with GLOB pattern matching.

Describe the solution you'd like

?, [] and ! be added as well

Describe alternatives you've considered

No response

Additional context

No response

@maxkatz6
Copy link
Member

Keep in mind this pattern should be supported on all platforms, where we use GLOB patterns.

In most cases we pass pattern "as is" to the platform
Windows: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Windows/Avalonia.Win32/Win32StorageProvider.cs#L250
FreeDesktop: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.FreeDesktop/DBusSystemDialog.cs#L201
GTK: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.X11/NativeDialogs/GtkNativeFileDialogs.cs#L123

And we only handle them ourselves for managed file picker, which is low priority: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Dialogs/Internal/ManagedFileChooserFilterViewModel.cs#L21-L23

Meaning, this request can only be implemented on managed file picker, and if Windows and Linux already handle extended syntax.

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

No branches or pull requests

2 participants