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
目的地の流れは、書くべきです。
Examples
WIMアーカイブのエントリーを抽出します。
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.