ID EN
Pathlib

is_block_device

Python 3.11

Return True if the path points to a block device (or a symbolic link pointing to a block device), False if it points to another kind of file.

Syntax

PYTHON
Path.is_block_device()