Package entropy :: Package spm :: Package plugins :: Package interfaces :: Package portage_plugin :: Module xpak :: Class tbz2

Class tbz2

source code

Instance Methods
 
__init__(self, myfile) source code
 
decompose(self, datadir, cleanup=1)
Alias for unpackinfo() --- Complement to recompose() but optionally deletes the destination directory.
source code
 
compose(self, datadir, cleanup=0)
Alias for recompose().
source code
 
recompose(self, datadir, cleanup=0)
Creates an xpak segment from the datadir provided, truncates the tbz2 to the end of regular data if an xpak segment already exists, and adds the new segment to the file with terminating info.
source code
 
recompose_mem(self, xpdata) source code
 
cleanup(self, datadir) source code
 
scan(self)
Scans the tbz2 to locate the xpak segment and setup internal values.
source code
 
filelist(self)
Return an array of each file listed in the index.
source code
 
getfile(self, myfile, mydefault=None)
Finds 'myfile' in the data segment and returns it.
source code
 
getelements(self, myfile)
A split/array representation of tbz2.getfile()
source code
 
unpackinfo(self, mydest)
Unpacks all the files from the dataSegment into 'mydest'.
source code
 
get_data(self)
Returns all the files from the dataSegment as a map object.
source code
 
getboth(self)
Returns an array [indexSegment,dataSegment]
source code
Method Details

decompose(self, datadir, cleanup=1)

source code 

Alias for unpackinfo() --- Complement to recompose() but optionally deletes the destination directory. Extracts the xpak from the tbz2 into the directory provided. Raises IOError if scan() fails. Returns result of upackinfo().

scan(self)

source code 

Scans the tbz2 to locate the xpak segment and setup internal values. This function is called by relevant functions already.