public static void MainStreams()
{
	RarArchive archive = RarArchive.Open(GetPartStreams());
	foreach (RarArchiveEntry entry in archive.Entries)
	{
		string path = Path.Combine(@"C:\", entry .FilePath);
		using (FileStream output = File.OpenWrite(path))
		{
			entry.WriteTo(output);
		}
	}
}

public static IEnumerable<Stream> GetPartStreams()
{
	foreach (string file in Directory.GetFiles(@"C:\parts"))
	{
		yield return File.OpenRead(file);
	}
}

Last edited Aug 3, 2010 at 8:23 PM by adamhathcock, version 2

Comments

No comments yet.