I have been trying to figure this out for a while now but cannot seem to figure it out. I keep getting a file system exception.
The exception is:
An unknown tar format was encountered.
Type: Xceed.GZip.GZippedFile
FullName: \SEARCH_JoeBlow_2010-11-09 22.23.09.001z.DITU-NOC.PKG.TAR
My code:
public override void ExtractTarGz(FileInfo searchFile, TransientFolder tempFolder)
{
var gzipFile = new DiskFile(searchFile.FullName);
if (!File.Exists(searchFile.FullName))
return;
AbstractFile tarFile = new GZippedFile(gzipFile);
AbstractFolder archive = new TarArchive(tarFile);
var destination = new DiskFolder(tempFolder.Folder.FullName);
destination.CopyTo(archive, true);
}
I am simply just trying to extract the gz file(searchfile) to the tempFolder. Any advice is much appreciated.