Class CharacterDevice
source code
object --+
|
_File --+
|
_Device --+
|
CharacterDevice
NAME
====
B{C{CharacterDevice}} - Define a character device filestream helper.
SYNOPSIS
========
c{CharacterDevice([I{major}, I{minor}] || [I{contents}, I{requires}, I{provides}, I{flavor}, I{mode}, I{owner}, I{group}, I{tags}])}
DESCRIPTION
===========
The C{CharacterDevice} class defines a character device filestream helper.
This class takes I{major} and I{minor} as mandatory arguments.
PARAMETERS
==========
The following parameters apply to the CharacterDevice class.
B{major}: Sets the character device major number. This parameter
is an integer.
B{minor}: Sets the character device minor number. This parameter
is an integer.
B{requires}: (None) Marks this device with the specified requirements.
This parameter is a deps.Dependency object.
B{provides}: (None) Marks this device as providing certain features or
characteristics. This parameter is a deps.Dependency object.
B{flavor}: (None) Marks this device with the specified flavor. File
flavors are aggregated to determine trove flavors. This parameter
is a deps.Flavor object.
B{owner}: ('root') Marks this device as owned by I{owner}. This parameter
is a string
B{group}: ('root') Marks this device as belonging to I{group}. This
parameter is a string
B{mode}: (0644) Defines the access permissons of the device. This
parameter is an integer.
B{tags} : (None) Tags associated with this device. When a file with a
tag is installed, removed, or changed, the listed tag handler is executed.
See documentation on tag handlers for more information. This parameter
is a list of strings.
USER COMMANDS
=============
The following user commands are applicable to C{CharacterDevice}:
- L{get(I{pathId})} : Returns a filestream with the settings
represented by this class.
EXAMPLES
========
C{dev = CharacterDevice(8, 1)}
C{dev.get()}
Creates a character device helper with major number 8 and minor number 1,
and retrieves the filestream associated with it.
|
Inherited from _Device:
__init__
Inherited from _File:
get,
getContents
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|
|
Inherited from object:
__class__
|