Upgrade to v2.5
Fyne API v2.5
app
canvas
container
data/binding
data/validation
dialog
driver
driver/desktop
driver/mobile
driver/software
lang
layout
storage
storage/repository
package repository
CopyableRepository
CustomURIRepository
HierarchicalRepository
ListableRepository
MovableRepository
Repository
WritableRepository
test
theme
widget
Fyne API "storage.FileFilter"
storage.FileFilter
import "fyne.io/fyne/v2/storage"
Usage
type FileFilter
type FileFilter interface {
Matches(fyne.URI) bool
}
FileFilter is an interface that can be implemented to provide a filter to a file dialog.
func NewExtensionFileFilter
func NewExtensionFileFilter(extensions []string) FileFilter
NewExtensionFileFilter takes a string slice of extensions with a leading . and creates a filter for the file dialog. Example: .jpg, .mp3, .txt, .sh
func NewMimeTypeFileFilter
func NewMimeTypeFileFilter(mimeTypes []string) FileFilter
NewMimeTypeFileFilter takes a string slice of mimetypes, including globs, and creates a filter for the file dialog. Example: image/, audio/mp3, text/plain, application/