package utils import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/storage" ) func PathToListableURI(path string) (fyne.ListableURI, error) { if len(path) > 0 { path = "file://" + path } uri, err := storage.ParseURI(path) if err != nil { return nil, err } return storage.ListerForURI(uri) }