Method: File::Stat#socket?
- Defined in:
- file.c
#socket? ⇒ Boolean
Returns true if stat is a socket, false if it isn’t or if the operating system doesn’t support this feature.
File.stat("testfile").socket? #=> false
5818 5819 5820 5821 5822 5823 5824 5825 5826 |
# File 'file.c', line 5818 static VALUE rb_stat_S(VALUE obj) { #ifdef S_ISSOCK if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue; #endif return Qfalse; } |