public Method

Stat.grpowned?

stat.grpowned?    true or false

Returns true if the effective group id of the process is the same as the group id of stat. On Windows NT, returns false.

File.stat("testfile").grpowned?      #=> true
File.stat("/etc/passwd").grpowned?   #=> false

Source Code

/*
*  call-seq:
*     stat.grpowned?   => true or false
*  
*  Returns true if the effective group id of the process is the same as
*  the group id of <i>stat</i>. On Windows NT, returns <code>false</code>.
*     
*     File.stat("testfile").grpowned?      #=> true
*     File.stat("/etc/passwd").grpowned?   #=> false
*     
*/

static VALUE
rb_stat_grpowned(obj)
   VALUE obj;
{
#ifndef _WIN32
   if (group_member(get_stat(obj)->st_gid)) 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.