Show: Delphi
C++
Display Preferences
System.Zip.TZipFile.Read
From XE2 API Documentation
Delphi
procedure Read(FileName: string; out Bytes: TBytes); overload; procedure Read(Index: Integer; out Bytes: TBytes); overload; procedure Read(FileName: string; out Stream: TStream; out LocalHeader: TZipHeader); overload; procedure Read(Index: Integer; out Stream: TStream; out LocalHeader: TZipHeader); overload;
C++
void __fastcall Read(System::UnicodeString FileName, /* out */ System::DynamicArray<System::Byte> &Bytes)/* overload */; void __fastcall Read(int Index, /* out */ System::DynamicArray<System::Byte> &Bytes)/* overload */; void __fastcall Read(System::UnicodeString FileName, /* out */ System::Classes::TStream* &Stream, /* out */ TZipHeader &LocalHeader)/* overload */; void __fastcall Read(int Index, /* out */ System::Classes::TStream* &Stream, /* out */ TZipHeader &LocalHeader)/* overload */;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | System.Zip.pas System.Zip.hpp |
System.Zip | TZipFile |
Description
Reads a file from a .zip archive.
There are four overloads of this procedure, depending on the file representation and the output mode.
-
FileNameindicates the name of the file in the .zip archive.
-
Bytesrepresents the output bytes (used by the first two overloads).
-
Indexis the index of the file in this .zip archive.
-
Streamis the output stream (used by the last two overloads).
-
LocalHeaderis the local file header.
The overload procedures that take an integer as a parameter are useful when the .zip archive contains duplicate file names.