Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
convertAbsoluteToRelativePath.m File Reference

convert absolute path into relative path, where the part of the absolute path that is matching the relative path is replaced with the templateText. More...

Functions

function result = convertAbsoluteToRelativePath (absolutePath, relativePath, templateText)
 convert absolute path into relative path, where the part of the absolute path that is matching the relative path is replaced with the templateText.
 

Detailed Description

convert absolute path into relative path, where the part of the absolute path that is matching the relative path is replaced with the templateText.

Function Documentation

◆ convertAbsoluteToRelativePath()

function result = convertAbsoluteToRelativePath ( absolutePath,
relativePath,
templateText )

convert absolute path into relative path, where the part of the absolute path that is matching the relative path is replaced with the templateText.

Parameters
absolutePathstring with the absolute path, for example "c:\myfiles\dir1\subdir1"
relativePathstring with the relative path, for example "c:\myfiles\dir2\subdir2"
templateTextstring with the template text to be inserted instead of the relativePath, for example "[RELATIVE]"
Return values
resultstring with the replaced string. When relativePath is not found in the absolutePath, result is equal to absolutePath. Otherwise, the result = "[RELATIVE]\..\..\dir1\subdir1"

@ Note: The reverse operation is done using convertRelativeToAbsolutePath function

References convertAbsoluteToRelativePath().

Referenced by convertAbsoluteToRelativePath(), and mibDeepController.saveConfig().

Here is the call graph for this function:
Here is the caller graph for this function: