Learn R Programming

SpaDES (version 1.0.1)

checkPath: Check filepath.

Description

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

Usage

checkPath(path, create)

## S3 method for class 'character,logical':
checkPath(path, create)

## S3 method for class 'character,missing':
checkPath(path)

## S3 method for class '`NULL`,ANY':
checkPath(path)

## S3 method for class '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.