FolderItemUtilities Xojo Module.

FolderItemUtilities.GetRelativePath Method

Gets path for folder item relative to another folder item, taking in parameter for desired path separator.

shared GetRelativePath(
   f as FolderItem,
   relativeTo as FolderItem,
   pathSeparator as String) as String

Parameters

f
The FolderItem to get relative path for.
relativeTo
The FolderItem that is point of origin which the other FolderItem should be relative too.
pathSeparator
Path separator to use.

Returns

String

Remarks

If considering the picture bellow, and passing in Docs.dpp for the relativeTo parameter and EHRawGIF.bundle for the f parameter and “\” for path separator then this function will return:

..\Mach-O Build\Mac64\EHRawGIF.bundle

See Also

FolderItemUtilities Class