File plugin - delete file

Hi all,

I need to delete a file that is into a remote path.

The round is:

I stream a file to the server under the main path(/uploads/myFiles) but this file is related to a table record,so if I delete this record I want delete also the remote file.
Into my record I have stored the path that I use for streaming the file(so “/uploads/myFiles/myfile.txt”) but the ```
plugin.file.deleteFile


So my question is: does exist a way to delete the remote file without map the remote disk?Or does exist a way to specify the relative remote path to the *plugin.file.deleteFile* function?

thanks in advance

Marco

look in the wiki:

http://wiki.servoy.com/display/public/DOCS/file[attachment=0]Schermafbeelding 2010-11-18 om 19.53.44.png[/attachment]

Yes, Harjo is right, you first need to get a JSFile representation of the server file (internally it is a special type of JSFile: a RemoteFile).
Then you can call delete() on it.

@Harjo: Thanks for your answer,I had look for something like this but I haven’t seen it!

@Patrick: Thanks for the elucidation! So the JSFile contains a kind of pointer to the remote file I think…or something similar :D

Thanks at all for the support!

Marco