application.getHostApplicationPath()

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

application.getHostApplicationPath()

Postby martinh » Thu Apr 24, 2008 4:37 pm

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.
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Postby patrick » Thu Apr 24, 2008 5:22 pm

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?
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3669
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby martinh » Thu Apr 24, 2008 5:54 pm

From what I understand what you want is the directory of Servoy on the server?


Yes, indeed that is what I want
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Postby patrick » Fri Apr 25, 2008 9:38 am

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.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3669
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby martinh » Fri Apr 25, 2008 10:11 am

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
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest