pydevDAG._decorations._devlink module — pydevDAG 1.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pydevDAG 1.0 documentation »
- pydevDAG »
- pydevDAG package »
- pydevDAG._decorations package »

# pydevDAG._decorations._devlink module

## pydevDAG._decorations._devlink

Simple Devlink class.

Most likely to be replaced by use of pyudev equivalent once available.

class `pydevDAG._decorations._devlink.` `Devlink`(path)

  Bases: `object`

  Represents a device link.

  `category`

    The category of this device link.

    Returns: | the category of the device link or None, if no category
    Return type: | str or NoneType

  `has_category`

    Whether this devlink has a category, like by-id, or by-path.

    Returns: | True if the devlink has a category, otherwise False.
    Return type: | boolean

    This is decided by taking apart the path and looking for the lack of expected distinguishing features.

  `path`

    The full path of the device link.

    Returns: | the full path
    Return type: | str

  `value`

    The value of the devlink, which is the basename of the path.

    Returns: | the basename, or None if this devlink has no category.
    Return type: | str or NoneType

### Navigation

- index
- modules |
- next |
- previous |
- pydevDAG 1.0 documentation »
- pydevDAG »
- pydevDAG package »
- pydevDAG._decorations package »