TAR ????

Contents
[ Hide Show ]

?? ??

Tar ????? ???? ?? ??? ?? ??? ??? ? ????. ??? ??? ??? ?? ????.

???? ?? ??

? ?? ??? tar ????? ???? ??? ????.

 1    using (FileStream tarFile = File.Open("joint.tar", FileMode.Create))
 2    {
 3        FileInfo fi1 = new FileInfo("text.txt");
 4        FileInfo fi2 = new FileInfo("picture.png");
 5
 6        using (var archive = new TarArchive())
 7        {
 8            archive.CreateEntry("text.txt", fi1);
 9            archive.CreateEntry("picture.png", fi2);
10            archive.Save(tarFile);
11        }
12    }

tar ???? ??

Unix ?? ?? ???? tar ????? ???? ?? ? tar ????? gzip?? ??? ? ????. Aspose.Zip? SaveGzipped ???? ??? ??? ?????.

1    using (var archive = new TarArchive())
2    {
3        archive.CreateEntry("text.txt", @"D:\texts\article.txt");
4        archive.CreateEntry("picture.png", @"D:\Picture\photo.png");
5        archive.SaveGzipped("result.tar.gz");
6    }

???? xz ????? Linux? Unix?? ??? ?? ????. tar ??? Aspose.Zip? ???? ?????. tar ????? SaveXzCompressed ???? ?????.

1    using (FileStream xzFile = File.Open("archive.tar.xz", FileMode.Create))
2    {
3        using (var archive = new TarArchive())
4        {
5            archive.CreateEntry("text.txt", @"D:\texts\article.txt");
6            archive.CreateEntry("picture.png", @"D:\Picture\photo.png");
7            archive.SaveXzCompressed(xzFile);
8        }
9    }

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.