normalizePath: Express file paths in their canonical form - Truly

Description Usage Arguments Details Value

View source: R/misc_fun.R

Description

Under Windows and UNIX, .Platform$file.sep both may expand to "/", whereas some upstream applications may still use "\" to separate folders and files.

Usage

1
normalizePath(path, winslash = .Platform$file.sep, mustWork = FALSE)

Arguments

path

A character vector of file paths.

winslash

the separator to be used on Windows – ignored elsewhere. Must be one of c("/", "\\").

mustWork

logical: if TRUE then an error is given if the result cannot be determined; if NA then a warning.

Details

Calls normalizePath with .Platform$file.sep. In addition, trailing slashes are removed.

Value

A character vector.


benjbuch/summerr documentation built on July 11, 2021, 9:40 a.m.