Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Text file is not getting extracted fully using extractcontents -- Need help very badly

$
0
0

Hi guys,

I have text.tar.gz which contains tar file and text file inside it. This text file contains 3 records. However i could see after using below code data is getting extracted but everything is been written in single line instead of 3 rows as expected. Can someone have a look with below code and let me know if anything need to be modified

 

public void ExtractTar(String tarFileName, String destFolder) {

    Stream inStream = File.OpenRead(tarFileName);

    TarArchive tarArchive = TarArchive.CreateInputTarArchive(inStream);
    tarArchive.ExtractContents(destFolder);
    tarArchive.Close();

    inStream.Close();
}

Viewing all articles
Browse latest Browse all 1764

Trending Articles