'Whether this path is a character device.'

def is_char_device(self):

    try:
        return S_ISCHR(self.stat().st_mode)
    except OSError as e:
        if (e.errno not in (ENOENT, ENOTDIR)):
            raise
        return False
