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

Method is_block_device

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

Whether this path is a block device.

(self)

Source from the content-addressed store, hash-verified

1311 return False
1312
1313 def is_block_device(self):
1314 """
1315 Whether this path is a block device.
1316 """
1317 try:
1318 return S_ISBLK(self.stat().st_mode)
1319 except OSError as e:
1320 if not _ignore_error(e):
1321 raise
1322 # Path doesn't exist or is a broken symlink
1323 # (see http://web.archive.org/web/20200623061726/https://bitbucket.org/pitrou/pathlib/issues/12/ )
1324 return False
1325 except ValueError:
1326 # Non-encodable path
1327 return False
1328
1329 def is_char_device(self):
1330 """

Callers

nothing calls this directly

Calls 3

statMethod · 0.95
S_ISBLKFunction · 0.90
_ignore_errorFunction · 0.85

Tested by

no test coverage detected