Class RarArchiveLoadOptions
Class RarArchiveLoadOptions
ชื่อพื้นที่: Aspose.Zip.Rar การประกอบ: Aspose.Zip.dll (25.5.0)
ตัวเลือกที่มี Aspose.Zip.Rar.rarArchive จะถูกโหลดจากไฟล์ที่บีบอัด
public class RarArchiveLoadOptions
Inheritance
object ← RarArchiveLoadOptions
อนุญาโตตุลาการ
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
RarArchiveLoadOptions()
public RarArchiveLoadOptions()
Properties
DecryptionPassword
รับหรือตั้งค่ารหัสผ่านเพื่อ decrypt entries และชื่อ entries
public string DecryptionPassword { get; set; }
คุณสมบัติมูลค่า
Examples
คุณสามารถให้รหัสผ่านการรหัสผ่านหนึ่งครั้งที่การรวบรวมไฟล์
using (FileStream fs = File.OpenRead("encrypted_archive.rar"))
{
using (var extracted = File.Create("extracted.bin"))
{
using (RarArchive archive = new RarArchive(fs, new ArchiveLoadOptions() { DecryptionPassword = "p@s$" }))
{
using (var decompressed = archive.Entries[0].Open())
{
byte[] b = new byte[8192];
int bytesRead;
while (0 < (bytesRead = decompressed.Read(b, 0, b.Length)))
extracted.Write(b, 0, bytesRead);
}
}
}
}
ดูเพิ่มเติม
RarArchiveEntry . Open ( string )