"plugins.file.trackFileForDeletion" seems not to work

Hi

I’ve tried the example like in the documentation:

var file = plugins.file.createFile("newfile.txt");
application.output("File erstellt? " + plugins.file.writeTXTFile(file, "some data"));
plugins.file.trackFileForDeletion(file);

The file will be created as expected and I can see it with the system explorer. But the file remains after closing the session and also after closing the developer. This also happens on the live-server. The files will never be removed!

Servoy-Version: 2020.12.1.3623 / NG-Client-Application

Could someone confirm this issue? If yes, I’ll open a ticket.

Best
Roland

Roland,

Are all tracked files remaining or just some?
I tried the simple case and it worked for me.

Also, there is no warning or error in the logs?

Rob

Hi Rob

Thanks for your reply.

In the meantime we got the solution from Johan (https://support.servoy.com/browse/SVY-16561). Our problem was that we’ve called “applicaiton.exit()” during “onSolutionClose” and that caused this behavior.

Roland