Page 1 of 1

"plugins.file.trackFileForDeletion" seems not to work

PostPosted: Thu Oct 07, 2021 5:54 pm
by rph
Hi

I've tried the example like in the documentation:

Code: Select all
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

Re: "plugins.file.trackFileForDeletion" seems not to work

PostPosted: Fri Nov 05, 2021 12:23 pm
by rgansevles
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

Re: "plugins.file.trackFileForDeletion" seems not to work

PostPosted: Fri Nov 05, 2021 2:32 pm
by rph
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