Skip to content
instance method

File::Stat#socket?

() -> bool
stat.socket? → true or false

Returns true if stat is a socket, false if it isn’t or if the operating system doesn’t support this feature.

Example
File.stat("testfile").socket?   #=> false
See also #size? #sticky? #size #symlink? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0