BBmisc (version 1.10)

getRelativePath: Construct a path relative to another

Description

Constructs a relative path from path from to path to. If this is not possible (i.e. different drive letters on windows systems), NA is returned.

Usage

getRelativePath(to, from = getwd(), ignore.case = isWindows())

Arguments

to
[character(1)] Where the relative path should point to.
from
[character(1)] From which part to start. Default is getwd.
ignore.case
[logical(1)] Should path comparisons be made case insensitve? Default is TRUE on Windows systems and FALSE on other systems.

Value

[character(1)]: A relative path.