User Tools

Site Tools


syntax:functions:combinepath

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
syntax:functions:combinepath [2018/08/13 15:43] dmitrysyntax:functions:combinepath [2021/09/08 14:26] – [Arguments] dmitry
Line 1: Line 1:
-===== combinepath(path1, path2) =====+====== CombinePath(path1, path2) =====
 +Category:  File function  (found in the "Special" category in the EasyMorph application)
  
-Combines two paths into one, intelligently dealing with backslashes and+\\  
 +=====Description===== 
 +This function combines two paths into one, intelligently dealing with backslashes and
 relative paths.  relative paths. 
  
-^  Example  ^  Result +\\  
-| combinepath("C:\data", "file.txt" |C:\data\file.txt | +=====Use cases===== 
-| combinepath("C:\data", "..\file.txt" |C:\file.txt |+This function is convenient in projects executed on EasyMorph Server.  In these cases, the root folder can be defined as a task parameter and the actual path calculated using //combinepath//.
  
-If the both arguments contain relative paths, then the resulting path will be converted into an absolute path in the current directory.+\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|path1|Text  |A file path. Absolute or relative. | 
 +|path2|Text  |A relative file path. |
  
-Use casesThis function is convenient for using in projects executed on EasyMorph ServerIn this case, the root folder can be defined as a task parameter, and the actual path calculated using ''combinepath''.+**Return value type:** Text. 
 + 
 +\\  
 +=====Remarks===== 
 +If both arguments contain relative pathsthen the resulting path will be converted into an absolute path in the current directory. 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  combinepath( 'C:\data', 'file.txt' )  //Returns 'C:\data\file.txt' 
 + 
 +  combinepath'C:\data', '..\file.txt' )  //Returns 'C:\file.txt' 
 + 
 +  combinepath( 'C:\myfiles', 'mydocs\myprojects' )  //Returns 'C:\myfiles\mydocs\myprojects' 
 + 
 + 
 +\\  
 +=====See also===== 
 +  * [[syntax:functions:combineurl|CombineURL(url, path)]].
syntax/functions/combinepath.txt · Last modified: 2021/09/08 14:34 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki