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

На пример, на платформима заснованим на Виндовсу, путеви морају бити мање од 248 знакова, а имена датотеке морају бити мање од 260 знакова.

NotSupportedException

Датотека у path’ садржи колону (:) у средини редове.

FileNotFoundException

Датотека није пронађена.

DirectoryNotFoundException

Одређени пут је неважећи, на пример, да се налази на немапираном дискову.

IOException

Датотека је већ отворена.

InvalidDataException

Архив је корумпиран.

Extract(Stream)

Екстрактира улаз у обезбеђени ток.

public void Extract(Stream destination)

Parameters

destination Stream

Destination stream. mora da bude pisano.

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.
 Српски