Files and storage
Files and storage
Bellui gives you three ways to keep data:
- Files and URIs. The
storagepackage reads, writes and lists resources named by a URI, such asfile:///home/ada/notes.txt. The same functions work with files picked in a file dialog, with Android content URIs, and with storage you plug in yourself. - Preferences. Small typed values (numbers, strings, flags, lists) that are saved for you between runs.
- App storage. A private folder of documents that belongs to your app.
Preferences and app storage are kept per app, so your app needs a unique ID.
Create the app with
app.NewWithID.
(app.New can take the ID from your app’s manifest,
but in this release only when the manifest is next to the program, as with
go run.)