Hi,
I need to define/customize the system temporary folder for XOJO applications and communicate the location of this custom folder to the system so that any system support files end up in this custom folder.
How can I do this?
Thanks
Hi,
I need to define/customize the system temporary folder for XOJO applications and communicate the location of this custom folder to the system so that any system support files end up in this custom folder.
How can I do this?
Thanks
In the docs, look for SpecialFolder and use the one ad-hoc (in the macOS documentation).
Not quite sure what you’re aiming for here. You want to redirect the Temporary folder for all Xojo apps running on your computer to a spot you define? Without modifying any of these apps?
What’s the actual goal?
Hi Eric,
Because in the client where the application will run, with the same Windows user, different profiles will be logged in and I would like each profile to have a different temporary files folder.
I am sure that you know the OS have a temporary folder. If not, now you know.
Now ask the question withour using Temporary, or go to SpecialFolder in the documentation and choose what you need there… For Windows, ApplicationData is a good place to write data per user…
Gotcha.
I would suggest you use the system Temporary folder and create uniquely named subfolders - perhaps using a UUID for the folder name, making sure you have a unique name before you commit to it. That will guarantee that your various profiles don’t collide with each other.
The problem with that scenario is… what will happens to these Temporary folders after a reboot ?
On Windows, nothing.
Also on Windows, temporary files are already user specific.
If the data they contain should persist, then they shouldnt be ‘temporary’ folders, but named folders in specialfolder.applicationdata (one per user)
Even if they should clear out (immediately or over time), its a good idea to clean up your mess now and then.
So named folders in specialfolder.applicationdata (one per user) still works, but the app should probably delete the contents when it starts up, or closes.
It irritates me to find hundreds of temp folders on my Mac (for example) created by running iOS apps in the simulator. Some of them go back years if I don’t delete them manually - silently eating up disc space.
Many developers don’t care because ‘disc space is cheap’, but it bothers me.
Exactly. Money isn’t everything.
Exactly Jeff, I could not have wrote a better (or equal) answer as what you wrote !
I do not even know if we are permitted to write in the Temporary folder of it is reserved (de facto or not) to the OS / Apple.
On the other hand, I do not want to hear from a custormer: “Where are gone the data I saved ?" (my software saved in a temporary folder…)
Hi Eric,
I’ll do more or less like this
Hi, all
I’m reporting this to understand what you mean.
Unfortunately, even if some people don’t like it, I still rely on what the IDE I used previously, VFP9, did.
All the temporary files generated by the program’s execution, such as cache, temporary backup files, etc., ended up in the custom temporary folder.
When the program was closed, everything that had been placed in the temporary folder was no longer useful.
Personally, from time to time, outside of office hours, I would delete all the temporary folders generated.
You know that at your application close time, you can delete the useless data you created (the temporary folders).
I wrote this entry because in yours, you do not say you already do that.
Remember to click in the Solution button in front of the solution entry ![]()