Method: File::Stat#grpowned?
- Defined in:
- file.c
#grpowned? ⇒ Boolean
Returns true if the effective group id of the process is the same as the group id of stat. On Windows, returns false
.
File.stat("testfile").grpowned? #=> true
File.stat("/etc/passwd").grpowned? #=> false
5909 5910 5911 5912 5913 5914 5915 5916 |
# File 'file.c', line 5909 static VALUE rb_stat_grpowned(VALUE obj) { #ifndef _WIN32 if (rb_group_member(get_stat(obj)->st_gid)) return Qtrue; #endif return Qfalse; } |