MCPcopy
hub / github.com/cool-RR/PySnooper / is_block_device

Method is_block_device

tests/mini_toolbox/pathlib.py:1598–1609  ·  view source on GitHub ↗

Whether this path is a block device.

(self)

Source from the content-addressed store, hash-verified

1596 return False
1597
1598 def is_block_device(self):
1599 """
1600 Whether this path is a block device.
1601 """
1602 try:
1603 return S_ISBLK(self.stat().st_mode)
1604 except OSError as e:
1605 if e.errno not in (ENOENT, ENOTDIR):
1606 raise
1607 # Path doesn't exist or is a broken symlink
1608 # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
1609 return False
1610
1611 def is_char_device(self):
1612 """

Callers

nothing calls this directly

Calls 1

statMethod · 0.95

Tested by

no test coverage detected