public Method

Stat.nlink

stat.nlink    fixnum

Returns the number of hard links to stat.

File.stat("testfile").nlink             #=> 1
File.link("testfile", "testfile.bak")   #=> 0
File.stat("testfile").nlink             #=> 2

Source Code

/*
*  call-seq:
*     stat.nlink   => fixnum
*  
*  Returns the number of hard links to <i>stat</i>.
*     
*     File.stat("testfile").nlink             #=> 1
*     File.link("testfile", "testfile.bak")   #=> 0
*     File.stat("testfile").nlink             #=> 2
*     
*/

static VALUE
rb_stat_nlink(self)
   VALUE self;
{
   return UINT2NUM(get_stat(self)->st_nlink);
}
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.