Compatibility: Versions 6.8.x and 2003.x
Here is a simple method that returns the absolute path of the merged application or structure folder:
` Project Method: Get_RootFolder
` Description: Returns the absolute path to the application/structure folder
C_LONGINT($platform;$length;$where)
C_TEXT($0;$sep;$path)
PLATFORM PROPERTIES($platform)
If($platform=3)
$sep:="\\"
Else
$sep:=":"
End if
If ((Application type=1) & ($sep=":"))
$path:=Replace string(Application file;".app";"")
Else
$path:=Structure file
End if
$length:=Length($path)
$where:=$length
Repeat
$where:=$where-1
Until($path[[$where]]=$sep)
$0:=Substring($path;1;$where)
Warning: This method does not work from within 4D Client. However, it can be executed on the Server to get the path of the structure file.