Get current workspace

Questions, tips and tricks and techniques for scripting in Servoy

Get current workspace

Postby sergei.sheinin » Fri Nov 28, 2014 2:21 pm

Is there a function in Servoy that returns disk path to current solution? I need to be able to obtain paths to i18N files while running a Servoy form. How would this be done?
Sergei Sheinin
JavaScript, RDBMS
Posts: 79
Joined: Wed May 07, 2014 3:22 pm

Re: Get current workspace

Postby jcompagner » Mon Dec 01, 2014 11:20 am

you only need this in developer somehow?
there are ways to get the workspace location (its a system property osgi.instance.area ) but that does not give you the full path especially if you are using git and having projects in a completely other location then the workspace.
Johan Compagner
User avatar
Posts: 8302
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Get current workspace

Postby xavi_tb » Tue Mar 31, 2015 9:46 am

vWorkspacePath = java.lang.System.getProperty("osgi.instance.area");
vWorkspacePath = vWorkspacePath.substr(6,vWorkspacePath.length)
Posts: 1
Joined: Tue Mar 31, 2015 9:45 am

Return to Methods

Who is online

Users browsing this forum: No registered users and 7 guests