Package duplicity :: Module manifest :: Class VolumeInfo
[hide private]
[frames] | no frames]

Class VolumeInfo

source code

Information about a single volume

Instance Methods [hide private]
 
__init__(self)
VolumeInfo initializer
source code
 
set_info(self, vol_number, start_index, start_block, end_index, end_block)
Set essential VolumeInfo information, return self
source code
 
set_hash(self, hash_name, data)
Set the value of hash hash_name (e.g.
source code
 
get_best_hash(self)
Return pair (hash_type, hash_data)
source code
 
to_string(self)
Return nicely formatted string reporting all information
source code
 
__str__(self)
Return nicely formatted string reporting all information
source code
 
from_string(self, s)
Initialize self from string s as created by to_string
source code
 
__eq__(self, other)
Used in test suite
source code
 
__ne__(self, other)
Defines !=
source code
 
contains(self, index_prefix, recursive=1)
Return true if volume might contain index
source code
Method Details [hide private]

set_info(self, vol_number, start_index, start_block, end_index, end_block)

source code 

Set essential VolumeInfo information, return self

Call with starting and ending paths stored in the volume. If a multivol diff gets split between volumes, count it as being part of both volumes.

set_hash(self, hash_name, data)

source code 

Set the value of hash hash_name (e.g. "MD5") to data

get_best_hash(self)

source code 

Return pair (hash_type, hash_data)

SHA1 is the best hash, and MD5 is the second best hash. None is returned if no hash is available.

contains(self, index_prefix, recursive=1)

source code 

Return true if volume might contain index

If recursive is true, then return true if any index starting with index_prefix could be contained. Otherwise, just check if index_prefix itself is between starting and ending indicies.