public Method

Stat.zero?

stat.zero?     true or false

Returns true if stat is a zero-length file; false otherwise.

File.stat("testfile").zero?   #=> false

Source Code

/*
*  call-seq:
*     stat.zero?    => true or false
*  
*  Returns <code>true</code> if <i>stat</i> is a zero-length file;
*  <code>false</code> otherwise.
*     
*     File.stat("testfile").zero?   #=> false
*     
*/

static VALUE
rb_stat_z(obj)
   VALUE obj;
{
   if (get_stat(obj)->st_size == 0) return Qtrue;
   return Qfalse;
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.