instance method
FileTest#empty?
(::path | ::io file_name) -> bool
empty?(p1)
file.c
View on GitHub ↗
static VALUE
rb_file_zero_p(VALUE obj, VALUE fname)
{
struct stat st;
if (rb_stat(fname, &st) < 0) return Qfalse;
return RBOOL(st.st_size == 0);
}
Alias of #zero?
Returns true if the named file exists and has a zero size.
file_name can be an IO object.