[fs.op.is.socket] # 31 Input/output library [[input.output]](./#input.output) ## 31.12 File systems [[filesystems]](filesystems#fs.op.is.socket) ### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.socket) #### 31.12.13.24 Is socket [fs.op.is.socket] [🔗](#lib:is_socket) `bool filesystem::is_socket(file_status s) noexcept; ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18182) *Returns*: s.type() == file_type​::​socket[.](#1.sentence-1) [🔗](#lib:is_socket_) `bool filesystem::is_socket(const path& p); bool filesystem::is_socket(const path& p, error_code& ec) noexcept; ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18194) *Returns*: is_socket(status(p)) or is_socket(status(p, ec)), respectively[.](#2.sentence-1) The signature with argument ec returns false if an error occurs[.](#2.sentence-2) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18200) *Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5 Error reporting")[.](#3.sentence-1)