User Tools

Site Tools


syntax:functions:combinepath

combinepath(path1, path2)

Combines two paths into one, intelligently dealing with backslashes and relative paths.

Example Result
combinepath(“C:\data”, “file.txt”) C:\data\file.txt
combinepath(“C:\data”, “..\file.txt”) C:\file.txt

If the both arguments contain relative paths, then the resulting path will be converted into an absolute path in the current directory.

Use cases: This function is convenient for using in projects executed on EasyMorph Server. In this case, the root folder can be defined as a task parameter, and the actual path calculated using combinepath.

syntax/functions/combinepath.txt · Last modified: 2018/08/13 19:43 by dmitry