abs2rel: Remove common part of two paths, leaving relative path

View source: R/fsutils.r

abs2relR Documentation

Remove common part of two paths, leaving relative path

Description

Remove common part of two paths, leaving relative path

Usage

abs2rel(path, stempath = getwd(), StopIfNoCommonPath = FALSE)

Arguments

path

Paths to make relative

stempath

Root to which path will be made relative

StopIfNoCommonPath

Error if no path in common

Value

Character vector containing relative path

Author(s)

jefferis

See Also

path.expand, normalizePath

Other path_utils: common_path(), split_path()

Examples

path = "/Volumes/JData/JPeople/Sebastian/images"
abs2rel(path,'/Volumes/JData')

jefferis/nat.utils documentation built on July 6, 2023, 4:42 p.m.