Package CedarBackup3 :: 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
 
__str__(self)
Informal string representation for class instance.
source code
 
_getBytesUsed(self)
Property target to get the bytes-used value.
source code
 
_getBytesAvailable(self)
Property target to get the bytes-available value.
source code
 
_getBoundaries(self)
Property target to get the boundaries tuple.
source code
 
_getTotalCapacity(self)
Property target to get the total capacity (used + available).
source code
 
_getUtilized(self)
Property target to get the percent of capacity which is utilized.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

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.
  totalCapacity
Total capacity of the disc, in bytes.
  utilized
Percentage of the total capacity which is utilized.

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__

__str__(self)
(Informal representation operator)

source code 

Informal string representation for class instance.

Overrides: object.__str__

Property Details [hide private]

bytesUsed

Space used on disc, in bytes.

Get Method:
_getBytesUsed(self) - Property target to get the bytes-used value.

bytesAvailable

Space available on disc, in bytes.

Get Method:
_getBytesAvailable(self) - Property target to get the bytes-available value.

boundaries

Session disc boundaries, in terms of ISO sectors.

Get Method:
_getBoundaries(self) - Property target to get the boundaries tuple.

totalCapacity

Total capacity of the disc, in bytes.

Get Method:
_getTotalCapacity(self) - Property target to get the total capacity (used + available).

utilized

Percentage of the total capacity which is utilized.

Get Method:
_getUtilized(self) - Property target to get the percent of capacity which is utilized.