Method: File.grpowned?
- Defined in:
- file.c
.grpowned?(file_name) ⇒ Boolean
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.
2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 |
# File 'file.c', line 2075 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; } |