APIdock / Ruby
/
method

grpowned?

ruby latest stable - Class: FileTest
grpowned?(p1)
public

Returns true if the named file exists and the effective group id of the calling process is the owner of the file. Returns false on Windows.

file_name can be an IO object.

static VALUE
rb_file_grpowned_p(VALUE obj, VALUE fname)
{
#ifndef _WIN32
 struct stat st;
 if (rb_stat(fname, &st) < 0) return Qfalse;
 if (rb_group_member(st.st_gid)) return Qtrue;
#endif
 return Qfalse;
}

AltStyle によって変換されたページ (->オリジナル) /