private static void OpenTar(Stream file) { using (var tar = new CsTar(file)) { tar.ReadHeaders(); } }
private void OpenTar(string file) { using (var tar = new CsTar(new FileStream(file, FileMode.Open))) { } }
private void button1_Click(object sender, EventArgs e) { if (DialogResult.OK == openFileDialog1.ShowDialog()) { using (var tar = new CsTar(new FileStream(openFileDialog1.FileName, FileMode.Open))) { OpenTar(openFileDialog1.FileName); } } }