File.grpowned?(file_name) → true or false
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.
Source Code
/* * call-seq: * File.grpowned?(file_name) => true or false * * Returns <code>true</code> if the named file exists and the * effective group id of the calling process is the owner of * the file. Returns <code>false</code> on Windows. */ static VALUE test_grpowned(obj, fname) VALUE obj, fname; { #ifndef _WIN32 struct stat st; if (rb_stat(fname, &st) < 0) return Qfalse; if (group_member(st.st_gid)) return Qtrue; #endif return Qfalse; }
<code/>and<pre/>for code samples.