Whether this path is a socket.
(self)
| 1635 | return False |
| 1636 | |
| 1637 | def is_socket(self): |
| 1638 | """ |
| 1639 | Whether this path is a socket. |
| 1640 | """ |
| 1641 | try: |
| 1642 | return S_ISSOCK(self.stat().st_mode) |
| 1643 | except OSError as e: |
| 1644 | if e.errno not in (ENOENT, ENOTDIR): |
| 1645 | raise |
| 1646 | # Path doesn't exist or is a broken symlink |
| 1647 | # (see https://bitbucket.org/pitrou/pathlib/issue/12/) |
| 1648 | return False |
| 1649 | |
| 1650 | def expanduser(self): |
| 1651 | """ Return a new path with expanded ~ and ~user constructs |