Check filepath.

Share:

Description

Checks the specified filepath for formatting consistencies, such as trailing slashes, etc.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
checkPath(path, create)

## S4 method for signature 'character,logical'
checkPath(path, create)

## S4 method for signature 'character,missing'
checkPath(path)

## S4 method for signature ''NULL',ANY'
checkPath(path)

## S4 method for signature 'missing,ANY'
checkPath()

Arguments

path

A character string corresponding to a filepath.

create

A logical indicating whether the path should be created if it doesn't exist. Default is FALSE.

Value

Character string denoting the cleaned up filepath.

See Also

file.exists, dir.create.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.