Add directory selection for saving converted files
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.
This commit is contained in:
19
internal/utils/path.go
Normal file
19
internal/utils/path.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user