grpowned?()
public
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?
File.stat("/etc/passwd").grpowned?
Show source
/*
* 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;
}