assertions-file {assertthat} | R Documentation |
Useful test related to files
Description
Useful test related to files
Usage
is.dir(path)
is.writeable(path)
is.readable(path)
has_extension(path, ext)
Arguments
path |
a file path to examine |
ext |
extension to test for ( |
Examples
see_if(is.dir(1))
tmp <- tempfile()
see_if(file.exists(tmp))
see_if(is.dir(tmp))
writeLines("x", tmp)
see_if(file.exists(tmp))
see_if(is.dir(tmp))
see_if(is.writeable(tmp))
see_if(is.readable(tmp))
unlink(tmp)
see_if(is.readable(tmp))
[Package assertthat version 0.2.1 Index]