C# 클래스 System.IO.Compression.ZipArchiveFile

ZipArchiveFile represents one archive file in the ZipArchive. It is analogous to the System.IO.DiffFile object for normal files.
파일 보기 프로젝트 열기: garyjohnson/wpnest 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CopyStream int
DateTimeToDosTime uint
DosTimeToDateTime DateTime
Read ZipArchiveFile
Validate void
WriteArchiveDirectoryEntryToStream void
WriteToStream void
WriteZipFileHeader void
ZipArchiveFile System.Diagnostics

공개 메소드들

메소드 설명
CopyTo ( string outputArchivePath ) : void

Copy the data in archive textStream named 'inputFilePath' into the 'this' archive textStream, discarding what was there before.

CopyToFile ( string outputFilePath ) : void

Copy the data in from the 'this' ZipArchiveFile to the archive textStream named 'outputFilePath' in to the file system at 'outputFilePath'.

Create ( ) : Stream

Truncates the archiveFile represented by the ZipArchiveFile to be empty and returns a Stream that can be used to write (binary) data into it.

CreateText ( ) : StreamWriter

Truncate the archive textStream and return a StreamWrite sutable for writing text to the textStream.

Delete ( ) : void

Delete the archiveFile represented by the ZipArchiveFile. The textStream can be in use without conflict. Deleting a textStream simply means it will not be persisted when ZipArchive.Close() is called.

MoveTo ( string newArchivePath ) : void

Truncates the archiveFile represented by the ZipArchiveFile to be empty and returns a TextWriter that text can be written to (using the default encoding).

OpenRead ( ) : Stream

Opens the archiveFile represented by the ZipArchiveFile and returns a stream that can use to read (binary) data.

OpenText ( ) : StreamReader

Opens the archiveFile represented by the ZipArchiveFile and returns a stream that can use to read text.

ReadAllText ( ) : string

Read all the text from the archiveFile represented by the ZipArchiveFile and return it as a string.

ToString ( ) : string

A text summary of the archive textStream (name and length).

WriteAllText ( string data ) : void

Replaces the data in the archiveFile represented by the ZipArchiveFile with the text in 'data'.

비공개 메소드들

메소드 설명
CopyStream ( Stream fromStream, Stream toStream ) : int

Copies from one stream to another.

DateTimeToDosTime ( DateTime dateTime ) : uint

Encodes a DateTime instance as a 32-bit number to save space. The format is used in DOS.

DosTimeToDateTime ( uint dateTime ) : DateTime

Convert a classic DOS time to date time.

Read ( ZipArchive archive ) : ZipArchiveFile

Reads a single archiveFile from a Zip Archive. Should only be used by ZipArchive.

Validate ( ) : void

Validate the data.

WriteArchiveDirectoryEntryToStream ( Stream writer ) : void

Writes an archive directory entry to stream.

WriteToStream ( Stream writer ) : void

Used by ZipArchive to write the entry to the archive.

WriteZipFileHeader ( Stream writer ) : void

Writes the Zip file header to the stream.

ZipArchiveFile ( ZipArchive archive, string archiveName ) : System.Diagnostics

Create a new archive archiveFile with no data (empty). It is expected that only ZipArchive methods will use this routine.

메소드 상세

CopyTo() 공개 메소드

Copy the data in archive textStream named 'inputFilePath' into the 'this' archive textStream, discarding what was there before.
public CopyTo ( string outputArchivePath ) : void
outputArchivePath string The output archive path.
리턴 void

CopyToFile() 공개 메소드

Copy the data in from the 'this' ZipArchiveFile to the archive textStream named 'outputFilePath' in to the file system at 'outputFilePath'.
public CopyToFile ( string outputFilePath ) : void
outputFilePath string The output file path.
리턴 void

Create() 공개 메소드

Truncates the archiveFile represented by the ZipArchiveFile to be empty and returns a Stream that can be used to write (binary) data into it.
public Create ( ) : Stream
리턴 Stream

CreateText() 공개 메소드

Truncate the archive textStream and return a StreamWrite sutable for writing text to the textStream.
public CreateText ( ) : StreamWriter
리턴 StreamWriter

Delete() 공개 메소드

Delete the archiveFile represented by the ZipArchiveFile. The textStream can be in use without conflict. Deleting a textStream simply means it will not be persisted when ZipArchive.Close() is called.
public Delete ( ) : void
리턴 void

MoveTo() 공개 메소드

Truncates the archiveFile represented by the ZipArchiveFile to be empty and returns a TextWriter that text can be written to (using the default encoding).
public MoveTo ( string newArchivePath ) : void
newArchivePath string The new archive path.
리턴 void

OpenRead() 공개 메소드

Opens the archiveFile represented by the ZipArchiveFile and returns a stream that can use to read (binary) data.
public OpenRead ( ) : Stream
리턴 Stream

OpenText() 공개 메소드

Opens the archiveFile represented by the ZipArchiveFile and returns a stream that can use to read text.
public OpenText ( ) : StreamReader
리턴 StreamReader

ReadAllText() 공개 메소드

Read all the text from the archiveFile represented by the ZipArchiveFile and return it as a string.
public ReadAllText ( ) : string
리턴 string

ToString() 공개 메소드

A text summary of the archive textStream (name and length).
public ToString ( ) : string
리턴 string

WriteAllText() 공개 메소드

Replaces the data in the archiveFile represented by the ZipArchiveFile with the text in 'data'.
public WriteAllText ( string data ) : void
data string The data to replace the archiveFile data with.
리턴 void