relativizePath: Relativize a Filepath

relativizePathR Documentation

Relativize a Filepath

Description

Relativizes a filepath. Somewhat the opposite of normalizePath.

Usage

relativizePath(x, dir = getwd(), sep = "/", ...)

Arguments

x

length one character: a file path

dir

a reference directory

sep

path separator

...

ignored arguments

Details

x and dir are first normalized, then x is expressed relative to dir. If x and dir are on different drives (i.e. C:/ D:/) x is returned as an absolute path.


tablet documentation built on April 3, 2025, 6:21 p.m.