Package conary :: Package conaryclient :: Module filetypes :: Class _Device
[hide private]
[frames] | no frames]

Class _Device

source code

object --+    
         |    
     _File --+
             |
            _Device
Known Subclasses:
BlockDevice, CharacterDevice


NAME
====

B{C{_Device}} - Define a _device filestream helper.

SYNOPSIS
========

c{_Device([I{major}, I{minor}] || [I{contents}, I{requires}, I{provides}, I{flavor}, I{mode}, I{owner}, I{group}, I{tags}])}

DESCRIPTION
===========

The C{_Device} class defines a _device filestream helper.
This class takes I{major} and I{minor} as mandatory arguments.

PARAMETERS
==========
The following parameters apply to the _Device class.

B{major}: Sets the _device major number.  This parameter
is an integer.

B{minor}: Sets the _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{_Device}:

    - L{get(I{pathId})} : Returns a filestream with the settings
      represented by this class.

EXAMPLES
========

C{dev = _Device(8, 1)}
C{dev.get()}

Creates a _device helper with major number 8 and minor number 1,
and retrieves the filestream associated with it.



Instance Methods [hide private]
 
__init__(self, major, minor, **kwargs) source code
 
_touchupFileStream(self, f) source code

Inherited from _File: get, getContents

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]

Inherited from _File: aliasedArgs, kwargs, needSha1

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, major, minor, **kwargs)
(Constructor)

source code 
Overrides: _File.__init__

_touchupFileStream(self, f)

source code 
Overrides: _File._touchupFileStream