Package CedarBackup2 :: Package writers :: Module cdwriter :: Class MediaCapacity
[hide private]
[frames] | no frames]

Class MediaCapacity

source code

object --+
         |
        MediaCapacity

Class encapsulating information about CD media capacity.

Space used includes the required media lead-in (unless the disk is unused). Space available attempts to provide a picture of how many bytes are available for data storage, including any required lead-in.

The boundaries value is either None (if multisession discs are not supported or if the disc has no boundaries) or in exactly the form provided by cdrecord -msinfo. It can be passed as-is to the IsoImage class.

Instance Methods [hide private]
 
__init__(self, bytesUsed, bytesAvailable, boundaries)
Initializes a capacity object.
source code
 
_getBytesUsed(self)
Property target used to get the bytes-used value.
source code
 
_getBytesAvailable(self)
Property target available to get the bytes-available value.
source code
 
_getBoundaries(self)
Property target available to get the boundaries tuple.
source code

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

Properties [hide private]
  bytesUsed
Space used on disc, in bytes.
  bytesAvailable
Space available on disc, in bytes.
  boundaries
Session disc boundaries, in terms of ISO sectors.

Inherited from object: __class__

Method Details [hide private]

__init__(self, bytesUsed, bytesAvailable, boundaries)
(Constructor)

source code 
Initializes a capacity object.
Raises:
  • IndexError - If the boundaries tuple does not have enough elements.
  • ValueError - If the boundaries values are not integers.
  • ValueError - If the bytes used and available values are not floats.
Overrides: object.__init__

Property Details [hide private]

bytesUsed

Space used on disc, in bytes.
Get Method:
CedarBackup2.writers.cdwriter.MediaCapacity._getBytesUsed(self) - Property target used to get the bytes-used value.

bytesAvailable

Space available on disc, in bytes.
Get Method:
CedarBackup2.writers.cdwriter.MediaCapacity._getBytesAvailable(self) - Property target available to get the bytes-available value.

boundaries

Session disc boundaries, in terms of ISO sectors.
Get Method:
CedarBackup2.writers.cdwriter.MediaCapacity._getBoundaries(self) - Property target available to get the boundaries tuple.