path_norm: Normalize a pathname

Description Usage Arguments Details Value Examples

View source: R/normalize.R

Description

Normalize a pathname by collapsing redundant separators and up-level references so that A//B, A/B/, A/./B and A/foo/../B all become A/B. This string manipulation may change the meaning of a path that contains symbolic links.

Usage

1
path_norm(path)

Arguments

path

Character vector of paths.

Details

On Windows, it converts forward slashes to backward slashes.

Value

Character vector of normalized paths.

Examples

1
path_norm(c("A//B", "A/B/", "A/./B", "A/foo/../B"))

richfitz/pathr documentation built on May 27, 2019, 8:22 a.m.