Class WimFileEntry

Class WimFileEntry

이름 공간 : Aspose.Zip.Wim 모임: Aspose.Zip.dll (25.5.0)

WIM 아카이브 내에서 단일 파일을 나타냅니다.

public sealed class WimFileEntry : WimEntry, IArchiveFileEntry

Inheritance

object WimEntry WimFileEntry

Implements

IArchiveFileEntry

상속 회원들

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; }

부동산 가치

long

Methods

Extract(스트리트)

제공된 경로를 통해 파일 시스템에 입력을 추출합니다.

public FileInfo Extract(string path)

Parameters

path string

목적지 파일의 경로.이 파일이 이미 존재한다면, 그것은 과장됩니다.

Returns

FileInfo

구성된 파일의 파일 정보.

Examples

using (var archive = new WimArchive("archive.wim"))
{
    archive.Images[0].RootDirectory.Files[0].Extract("data.bin");
}

Exceptions

ArgumentNullException

path’ is null.

SecurityException

호출자는 필요한 액세스 허가를 가지고 있지 않습니다.

ArgumentException

path’는 텅 비어 있고, 흰색 공간만 포함하거나, 불가능한 문자를 포함합니다.

UnauthorizedAccessException

path" 파일에 대한 액세스는 거부됩니다.

PathTooLongException

지정된 path’, 파일 이름, 또는 둘 다 시스템에 의해 정의 된 최대 길이를 초과합니다.예를 들어, Windows 기반 플랫폼에서 경로는 248 문자 미만이어야하며 파일 이름은 260 문자 미만이어야합니다.

NotSupportedException

path’에 있는 파일에는 링의 중간에 있는 열(:)이 포함되어 있습니다.

FileNotFoundException

파일은 찾을 수 없습니다.

DirectoryNotFoundException

지정된 경로는 불가능하며, 예를 들어 지정되지 않은 드라이브에 있습니다.

IOException

파일은 이미 열려 있습니다.

InvalidDataException

아카이브가 부패했다.

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

ArgumentException

destination’ does not support writing.

InvalidDataException

아카이브가 부패했다.

Open()

추출에 대한 입력을 열고 입력 콘텐츠와 함께 흐름을 제공합니다.

public Stream Open()

Returns

Stream

입력의 내용을 나타내는 흐름.

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.
 한국어