Choose files
This page is all about letting a user choose a file from their file system. NovaOS lets users select files from the registered app which has its capabilities including 'file'.
Determining the file app
To allow for customizability, NovaOS lets users use a files app of their choice. But which files app do we open to choose a file?
fileTypeAssociations
is a system that lets apps register their supporting file types - file types they can handle.
Now, as we got appIdToOpen, which is the files app we can request to let the user choose a file, lets ask it.
Requesting an 'opener'
Here is the method to summon a choose file window with the default files app in NovaOS.
Here, we use the OL protocol to launch the application with the data, which has some params.
Opener params
opener
A file type to filter with.
"opener":"json" "opener":"app"
dir
A directory to initialize the choose file window with.
"dir":"Downloads/" "dir":"Apps/"
Reciving the selected file
Here is a snippet that recives a file from a choose file window.
Last updated