This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

resolvepath Macro

21st February 2015 at 10:38pm
Core Macros Macros

The resolvepath macro takes a relative path and an absolute path. It interprets the former relative to the latter, and returns the absolute equivalent of the former.

Folders in the paths are delimited by /.

The special folder name . denotes the current folder, and .. denotes the parent folder.

If the absolute path indicates a folder, it needs to end with /. Anything after the final / is treated as an arbitrary filename within the intended path, and is discarded.

If no absolute path is supplied, the relative path is returned unchanged, except that anything after the final / is discarded.

The return value is a path, but does not end with /.

Parameters

source
the relative path
root
the absolute path

Examples