Quantcast
Channel: sharpcompress Discussions Rss Feed
Viewing all articles
Browse latest Browse all 239

New Post: How rar and password ? how to add a password?

$
0
0
how to add a password?

using (Stream stream = File.OpenRead(@"C:\00\22.rar"))
        {
           stream.File.Password = "password"; //  how to add a password?
            var reader = ReaderFactory.Open(stream);

            while (reader.MoveToNextEntry())
            {
                if (!reader.Entry.IsDirectory)
                {
                    Console.WriteLine(reader.Entry.FilePath);
                    reader.WriteEntryToDirectory(@"C:\00\temp", ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite);
                }
            }
        }

Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>