Introduce logic and UI for selecting and persisting a directory to save converted files. Extend existing components with directory selection buttons, message updates, and storage preferences.
20 lines
298 B
Go
20 lines
298 B
Go
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)
|
|
}
|