instance method
File::Stat#zero?
() -> bool
stat.zero? → true or false
file.c
View on GitHub ↗
static VALUE
rb_stat_z(VALUE obj)
{
if (get_stat(obj)->ST_(size) == 0) return Qtrue;
return Qfalse;
}
Returns true if stat is a zero-length file; false otherwise.
Example
File.stat("testfile").zero? #=> false