Class CpioEntry

Class CpioEntry

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

Cpio 파일 내에서 단일 파일을 나타냅니다.

public sealed class CpioEntry : IArchiveFileEntry

Inheritance

object CpioEntry

Implements

IArchiveFileEntry

상속 회원들

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Properties

IsDirectory

입력이 디렉토리를 나타내는지 여부를 나타내는 값을 얻습니다.

public bool IsDirectory { get; }

부동산 가치

bool

LastWriteTimeUtc

마지막으로 글을 쓰는 시간을 얻는다.

public DateTime LastWriteTimeUtc { get; }

부동산 가치

DateTime

Length

바이트로 입력의 길이를 얻습니다.

public long Length { get; }

부동산 가치

long

Name

아카이브 내에서 입력의 이름을 얻습니다.

public string Name { get; }

부동산 가치

string

Parent

입장에 속하는 아카이브를 얻으십시오.

public CpioArchive Parent { get; }

부동산 가치

CpioArchive

Methods

Extract(스트리트)

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

public FileSystemInfo Extract(string path)

Parameters

path string

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

Returns

FileSystemInfo

구성된 파일의 파일 정보.

Examples

using (var archive = new CpioArchive("archive.cpio"))
{
    archive.Entries[0].Extract("data.bin");
}

Exceptions

ArgumentNullException

path’ is null.

SecurityException

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

ArgumentException

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

UnauthorizedAccessException

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

PathTooLongException

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

NotSupportedException

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

FileNotFoundException

파일은 찾을 수 없습니다.

DirectoryNotFoundException

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

IOException

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

Extract(Stream)

제공되는 흐름에 입구를 추출합니다.

public void Extract(Stream destination)

Parameters

destination Stream

목적지 흐름.그것은 쓸 수 있어야합니다.

Examples

cpio 아카이브의 입력을 추출합니다.

using (var archive = new CpioArchive("archive.cpio"))
{
    archive.Entries[0].Extract(httpResponseStream);
}

Exceptions

ArgumentException

destination’ does not support writing.

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.

### <a id="Aspose_Zip_Cpio_CpioEntry_ToString"></a> ToString\(\)

```csharp
public override string ToString()

Returns

string

 한국어