MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / is_socket

Method is_socket

tools/python-3.11.9-amd64/Lib/pathlib.py:1361–1375  ·  view source on GitHub ↗

Whether this path is a socket.

(self)

Source from the content-addressed store, hash-verified

1359 return False
1360
1361 def is_socket(self):
1362 """
1363 Whether this path is a socket.
1364 """
1365 try:
1366 return S_ISSOCK(self.stat().st_mode)
1367 except OSError as e:
1368 if not _ignore_error(e):
1369 raise
1370 # Path doesn't exist or is a broken symlink
1371 # (see http://web.archive.org/web/20200623061726/https://bitbucket.org/pitrou/pathlib/issues/12/ )
1372 return False
1373 except ValueError:
1374 # Non-encodable path
1375 return False
1376
1377 def expanduser(self):
1378 """ Return a new path with expanded ~ and ~user constructs

Callers

nothing calls this directly

Calls 3

statMethod · 0.95
S_ISSOCKFunction · 0.90
_ignore_errorFunction · 0.85

Tested by

no test coverage detected