How to keep temp files?

Raymundo.Cassani
Thu, 27 Nov 2025 14:35:54 +0000

Hi @Renoald,

There is not a preference to avoid deleting temporary files.

There are two ways temporary files (tmp files) are created: by Brainstorm of by Plugins functions.
Tmp files created by Brainstorm are deleted by Brainstorm. Tmp files created by Plugin functions are deleted either by the same Plugin or by Brainstorm, this depends from function to function.

1. For tmp files deleted by Brainstorm, the function file_delete( ) is used.

So, you could place a breakpoint in the file_delete() function and check when it is called to delete the tmp files of interest. Then on that caller function comment file_delete() or make a copy of the tmp files to other place (e.g., with the function file_copy())

2. For tmp files deleted by Plugins, they can be deleted in several different ways depending on the plugin. Thus you would need to inspect the plugin functions to check where the tmp files are deleted.

Also, temporary files are not deleted on closing Brainstorm.

Adding the preference to avoid Brainstorm delete tmp files (point 1 above) would be a interesting addition.

@tmedani, any thoughts on this?

Read full topic