grapes-slash-slash-grapes: Join two paths

Description Usage Arguments Value See Also Examples

Description

Join two path components in the "natural" way, as you would expect to using a / operator. lhs and rhs may be any object that implements the as.character S3 method, including Path

Usage

1
lhs %//% rhs

Arguments

lhs

the path component(s) to be joined on lhs

rhs

path components(s) to be joined on rhs

Value

a new Path object (or vector of) corresponding to the joined elements

See Also

Other Path: Path$.., Path$., Path$dir, Path$join, Path$name, Path$new, Path$parent, Path$show, Path

Examples

1
2
3
4
5
path <- Path$new("root/parent/name")
child <- path %//% "child"
print(glue::glue("path : {path$show}",
                 "child: {child$show}",
                 .sep = "\n"))

pathlibr documentation built on May 1, 2019, 8:22 p.m.