Example #1
0
File: ida.py Project: diacus/celda
def recover(blockA, blockB, blocC):
    """
    Recovers the original file from the given blocks
    
    @param blockA: BlockStream instance
    @param blockB: BlockStream instance
    @param blockC: BlockStream instance
    
    @return A FragmentStream instance
    """

    conf     = SADConfig()
    rec      = conf.getrecpath()
    cache    = conf.getstoragepath()
    bnames   = list()
    for b in [blockA, blockB, blocC]:
        name = os.path.join( cache, b.getfilename() )
        b.savetofile(name)
        bname.append(name)

    fragname = blockA.getfilename()[:-6]