"plugins.file.trackFileForDeletion" seems not to work

Questions and answers on developing, deploying and using plugins and JavaBeans

"plugins.file.trackFileForDeletion" seems not to work

Postby rph » Thu Oct 07, 2021 5:54 pm

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
rph
 
Posts: 51
Joined: Wed Aug 10, 2011 11:44 am
Location: Cham, Switzerland

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

Postby rgansevles » Fri Nov 05, 2021 12:23 pm

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
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1909
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

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

Postby rph » Fri Nov 05, 2021 2:32 pm

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
rph
 
Posts: 51
Joined: Wed Aug 10, 2011 11:44 am
Location: Cham, Switzerland


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 3 guests