The AS Scheduler is a B4X library for displaying and interacting with appointments. You want to try the views out? Then click here This library is not free, because, it cost a lot of time and gray hair to create such views. https://payhip.com/b/nrtw5 Thanks for your understanding. :) The...
When the package is packaged using Macsigner and becomes a single file, the File.DirApp directory is no longer usable.
Now with "temporary" files such as PDFs that are loaded, Excel files that are saved can be moved to the File.DirTemp folder and everything works properly.
But if a file must be persistent, such as a db, which directory can it be moved to ?
Looking at the following documentation, I don't think there are any valid alternatives.
File.DirAssets - The assets folder holds the files that were added to the Files tab. This is a virtual read-only folder. When you compile your program in Release mode the files are packaged inside the Jar files.
File.DirTemp - A temporary folder.
File.DirApp - The program folder. This is the path to the jar file. Note that on Windows it might be read-only (if the program is installed in Program Files).
File.DirData - A folder suitable for writing files. On non-Windows it is the same as File.DirApp. On Windows it points to the user data folder
More information.
I did some tests.
if you use the following code
B4X:
Dim tempDir As String
tempDir = File.Combine(File.DirApp, "TempFolder")
Log(File.DirApp)
' Crea la directory di appoggio se non esiste già
If File.Exists(tempDir, "") = False Then
File.MakeDir(tempDir, "")
fx.Msgbox(MainForm, tempDir,"")
Else
fx.Msgbox(MainForm, tempDir,"**ESISTE**")
End If
using run.command you have the following result (correct and folder is created )
using package file you have the following result and no folder is created
The AS Scheduler is a B4X library for displaying and interacting with appointments. You want to try the views out? Then click here This library is not free, because, it cost a lot of time and gray hair to create such views. https://payhip.com/b/nrtw5 Thanks for your understanding. :) The...