checkFile: Check whether file(s) exist

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/file_dir.R

Description

checkFile checks whether file exists, assertFile stops the program if files do not exist

Usage

1
2
3

Arguments

...

Files to be checked

Details

assertFile is often used in scripts where missing a file would cause the script fail.

Value

checkFile returns logical vector. assertFile returns an invisible TRUE if files exist, otherwise halts and prints error messages.

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

See Also

isDir and assertDir

Examples

1
2
3
4
myDesc <- system.file("DESCRIPTION", package="ribiosUtils")
myNEWS <- system.file("NEWS", package="ribiosUtils")
checkFile(myDesc, myNEWS)
assertFile(myDesc, myNEWS)

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.