empty?()
public
Tests the file is empty.
See Dir#empty? and FileTest.empty?.
Show source
static VALUE
path_empty_p(VALUE self)
{
VALUE path = get_strpath(self);
if (RTEST(rb_funcall(rb_mFileTest, id_directory_p, 1, path)))
return rb_funcall(rb_cDir, id_empty_p, 1, path);
else
return rb_funcall(rb_mFileTest, id_empty_p, 1, path);
}