Persistent Data Storage Location
To ensure data persistence, never store runtime-generated data next to the executable. For cross-platform compatibility, Strawberry Software recommends a unique child folder of SpecialFolder.ApplicationData. On Linux, this resolves to the user $HOME directory.
var fData as FolderItem
fData = SpecialFolder.ApplicationData.Child("com.mycompany.myapp")
// fData.NativePath = $HOME/com.mycompany.myapp
if not fData.Exists then
fData.CreateFolder
end
Updating a web app will delete and replace the application folder, so it is unsafe to store runtime-generated data next to the executable.
Functions like GetFolderItem() that return a FolderItem within the application folder will be problematic for persistent data storage and need to be removed.