Method: File::Stat#sticky?

Defined in:
file.c

#sticky?Boolean

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

Returns:

  • (Boolean)


6279
6280
6281
6282
6283
6284
6285
6286
# File 'file.c', line 6279

static VALUE
rb_stat_sticky(VALUE obj)
{
#ifdef S_ISVTX
    if (get_stat(obj)->st_mode & S_ISVTX) return Qtrue;
#endif
    return Qfalse;
}