public Method

Stat.sticky?

stat.sticky?     true or false

Returns true if stat has its sticky bit set, false if it doesn’t or if the operating system doesn’t support this feature.

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

Source Code

/*
*  call-seq:
*     stat.sticky?    => true or false
*  
*  Returns <code>true</code> if <i>stat</i> has its sticky bit set,
*  <code>false</code> if it doesn't or if the operating system doesn't
*  support this feature.
*     
*     File.stat("testfile").sticky?   #=> false
*     
*/

static VALUE
rb_stat_sticky(obj)
   VALUE obj;
{
#ifdef S_ISVTX
   if (get_stat(obj)->st_mode & S_ISVTX) return Qtrue;
#endif
   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.