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

Method is_char_device

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

Whether this path is a character device.

(self)

Source from the content-addressed store, hash-verified

1327 return False
1328
1329 def is_char_device(self):
1330 """
1331 Whether this path is a character device.
1332 """
1333 try:
1334 return S_ISCHR(self.stat().st_mode)
1335 except OSError as e:
1336 if not _ignore_error(e):
1337 raise
1338 # Path doesn't exist or is a broken symlink
1339 # (see http://web.archive.org/web/20200623061726/https://bitbucket.org/pitrou/pathlib/issues/12/ )
1340 return False
1341 except ValueError:
1342 # Non-encodable path
1343 return False
1344
1345 def is_fifo(self):
1346 """

Callers

nothing calls this directly

Calls 3

statMethod · 0.95
S_ISCHRFunction · 0.90
_ignore_errorFunction · 0.85

Tested by

no test coverage detected