folder.go 330 B

1234567891011121314151617181920212223
  1. package mobile
  2. import (
  3. "fmt"
  4. "fyne.io/fyne/v2"
  5. )
  6. type lister struct {
  7. fyne.URI
  8. }
  9. func (l *lister) List() ([]fyne.URI, error) {
  10. return listURI(l)
  11. }
  12. func listerForURI(uri fyne.URI) (fyne.ListableURI, error) {
  13. if !canListURI(uri) {
  14. return nil, fmt.Errorf("specified URI is not listable")
  15. }
  16. return &lister{uri}, nil
  17. }