![]() Example |
![]() ![]() ![]() |
acFileStorage component.
|
function Extract(const FileName: String; OutputFile: String = ''): Boolean; overload;
|
function Extract(FileIndex: Integer; OutputFile: String = ''): Boolean; overload;
|
The Extract method is destined to extract stored files from acFileStorage component to disk.
|
|
Parameters | Meanings
|
FileName | specifies the exact (though case sensitive) file name of stored file.
|
FileIndex | this is alternative to FileName parameter in overloaded version of Extract method. Specifies the index of file in Files list.
|
OutputFile | specifies the location (directory) and the file name of output file. If not specified, the FileStorage will extract file to path specified in AutoExtract.ExtractTo.SubDirectory property.
|
|
Returns True if file has been successfully extracted.
|
procedure TForm1.ExtractBtnClick(Sender: TObject);
|
begin
|
acFileStorage1.Extract('MyFile.exe', 'c:\MyFolder\MyFile.exe');
|
end;
|
procedure TOptionsForm.DefaultsBtnClick(Sender: TObject);
|
begin
|
MainForm.acFileStorage1.Extract(0); // extracts first file in Files list to current folder
|
end;
|
AutoExtract structure and Files property.
|