Page 1 of 1
application.getHostApplicationPath()
Posted:
Thu Apr 24, 2008 4:37 pm
by martinh
Could you please provide the following function:
application.getHostApplicationPath()
This function should return:
C:\Program Files\Servoy3.5.5
if that is the path where my Servoy is installed.
I need this request, because some files must be created under the Servoy Installation Directory.
Posted:
Thu Apr 24, 2008 5:22 pm
by patrick
You could try
- Code: Select all
var vPath = new java.io.File(new java.io.File(" ").getAbsolutePath()).getParent();
But this works only in developer. From what I understand what you want is the directory of Servoy on the server?
Posted:
Thu Apr 24, 2008 5:54 pm
by martinh
From what I understand what you want is the directory of Servoy on the server?
Yes, indeed that is what I want
Posted:
Fri Apr 25, 2008 9:38 am
by patrick
But then it is not good enough to know the path. You also need a way to transfer the file to the server. Have a look at IT2BE's (free) Tools plugin. I think it has a method to transfer files to the server.
Posted:
Fri Apr 25, 2008 10:11 am
by martinh
In my case I need it for a webclient solution.
So in that case files are read/written from/to server and not the client
But I can imagine that there should be also support for reading/writing files serverside and not clientside within smartclient and that those files must be written in a subdirectory of the Servoy installation directory