Class WimFileEntry
ชื่อพื้นที่: Aspose.Zip.Wim การประกอบ: Aspose.Zip.dll (25.5.0)
แสดงไฟล์เดียวภายในไฟล์ wim
public sealed class WimFileEntry : WimEntry, IArchiveFileEntry
Inheritance
object ← WimEntry ← WimFileEntry
Implements
อนุญาโตตุลาการ
WimEntry.ToString() , WimEntry.Archive , WimEntry.Image , WimEntry.Parent , WimEntry.Name , WimEntry.ShortName , WimEntry.FullPath , WimEntry.ChangeTime , WimEntry.CreationTime , WimEntry.LastAccessTime , WimEntry.LastWriteTime , WimEntry.ModificationTime , WimEntry.FileAttributes , WimEntry.AlternateDataStreams , WimEntry.HardLink , WimEntry.HasHardLinks , WimEntry.IsDirectory , object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Properties
Length
รับความยาวของการเข้าสู่ระบบในไบต์
public long Length { get; }
คุณสมบัติมูลค่า
Methods
Extract(รั้ว)
นําเข้าสู่ระบบไฟล์โดยเส้นทางที่ให้
public FileInfo Extract(string path)
Parameters
path
string
เส้นทางไปยังไฟล์เป้าหมาย หากไฟล์มีอยู่แล้วมันจะถูกเขียนเกินไป
Returns
ข้อมูลไฟล์ของไฟล์ประกอบ
Examples
using (var archive = new WimArchive("archive.wim"))
{
archive.Images[0].RootDirectory.Files[0].Extract("data.bin");
}
Exceptions
path’ is null.
ผู้โทรไม่ได้รับอนุญาตให้เข้าถึง
path" เป็นที่ว่างเปล่ามีพื้นที่สีขาวเท่านั้นหรือมีตัวอักษรที่ไม่ถูกต้อง
การเข้าถึงไฟล์ path" ถูกปฏิเสธ
ระบุ path’, ชื่อไฟล์, หรือทั้งสองเกินความยาวสูงสุดที่กําหนดโดยระบบ ตัวอย่างเช่นบนแพลตฟอร์มที่ใช้ Windows, เส้นทางจะต้องน้อยกว่า 248 หมายเลขและชื่อไฟล์จะต้องน้อยกว่า 260 หมายเลข
ไฟล์ใน path" มีคอลัมน์ (:) ในส่วนกลางของเส้น
ไฟล์ไม่ได้พบ
เส้นทางที่ระบุไม่ถูกต้องเช่นอยู่บนไดรฟ์ที่ไม่มีแผนที่
ไฟล์นี้เปิดแล้ว
ไฟล์นี้ถูกทําลาย
Extract(Stream)
นําเข้าสู่การไหลที่ให้
public void Extract(Stream destination)
Parameters
destination
Stream
จุดหมายปลายทาง Stream. ต้องการเขียนได้
Examples
extract entry ของ wim archive.
using (var archive = new WimArchive("archive.wim"))
{
archive.Images[0].RootDirectory.Files[0].Extract(httpResponseStream);
}
Exceptions
destination’ does not support writing.
ไฟล์นี้ถูกทําลาย
Open()
เปิดป้อนสําหรับการสกัดและให้การไหลที่มีเนื้อหาป้อน
public Stream Open()
Returns
กระแสที่แสดงให้เห็นถึงเนื้อหาของป้อน
Examples
การใช้งาน :Stream decompressed = entry.Open();
.NET 4.0 และสูงกว่า - ใช้วิธีการ Stream.CopyTo:decompressed.CopyTo(httpResponse.OutputStream)
.NET 3.5 และก่อนหน้านี้ - คัดลอกไบต์ด้วยตนเอง:
byte[] buffer = new byte[8192];
int bytesRead;
while (0 < (bytesRead = decompressed.Read(buffer, 0, buffer.Length)))
fileStream.Write(buffer, 0, bytesRead);
```</p>
#### Remarks
Read from the stream to get the original content of a file. See examples section.