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
입력 및 입력 이름을 해독하거나 암호를 설정합니다.
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 )