filepicker: Allow for different filesystems to be used
Is your feature request related to a problem? Please describe. I would love to be able to utilize the filepicker bubble with a spoofed or mocked filesystem. If I wanted to create a program that has different isolated exercises/levels/puzzles/etc and still utilize the filepicker bubble, there would be no way to handle this without writing the files to disk. Especially in the situation of a puzzle, where you might not want the user to be able to access the files with their full CLI tools in another window
Describe the solution you'd like I'd like for the model to take in some sort of filesystem interface that defaults to the OS filesystem but would allow something else (like afero's mock implementation, for example)
Describe alternatives you've considered Using a list or lipgloss tree to kinda handroll the basic filepicker implementation, but with a mock filesystem
filesystem interface could use the newer io/fs interfaces for generic pluggability: https://pkg.go.dev/io/fs
See #759 which is already an implementation that allows to use a filepicker over any io/fs.FS.
Here are a few projects that use it: https://github.com/dolmen-go/iofs-shell (check the replace line in go.mod of each project to use my fork until my PR is considered by the bubbles' maintainers).