Learn R Programming

assertive (version 0.2-6)

assert_all_are_empty_files: Is a file empty?

Description

Checks to see if a file is empty.

Usage

assert_all_are_empty_files(x)

assert_any_are_empty_files(x)

is_empty_file(x)

Arguments

x
Input to check.

Value

  • is_empty_file wraps file.info, retuning TRUE when the input is a file that exists with size zero. assert_*_are_empty_files return nothing but throws an error if is_empty_file returns FALSE.

See Also

file.info.

Examples

Run this code
tf <- tempfile()
file.create(tf)
is_empty_file(tf)
unlink(tf)

Run the code above in your browser using DataLab