public Method

Stat.blksize

stat.blksize    integer or nil

Returns the native file system’s block size. Will return nil on platforms that don’t support this information.

File.stat("testfile").blksize   #=> 4096

Source Code

/*
*  call-seq:
*     stat.blksize   => integer or nil
*  
*  Returns the native file system's block size. Will return <code>nil</code>
*  on platforms that don't support this information.
*     
*     File.stat("testfile").blksize   #=> 4096
*     
*/

static VALUE
rb_stat_blksize(self)
   VALUE self;
{
#ifdef HAVE_ST_BLKSIZE
   return ULONG2NUM(get_stat(self)->st_blksize);
#else
   return Qnil;
#endif
}
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.