Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
paszlib. Determine if extraction was successful
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TLazSerial : serial port ...
by
CM630
[
Today
at 07:55:15 am]
Recompiled IDE with LCLRe...
by
AlexTP
[
Today
at 05:09:56 am]
Hashing pointers by using...
by
ALLIGATOR
[
Today
at 04:41:23 am]
exception external SIGSEG...
by
billjtx
[
Today
at 01:06:50 am]
Commerce website written ...
by
Joanna
[
Today
at 01:00:28 am]
So many "newbies"
by
Curt Carpenter
[
Today
at 12:40:11 am]
TaurusTLS 1.0.0.25 beta 2...
by
LeP
[December 12, 2025, 09:21:31 pm]
Single / Double / Float s...
by
tetrastes
[December 12, 2025, 09:10:39 pm]
Publish a LAMW app in F-d...
by
spacepascal
[December 12, 2025, 09:00:41 pm]
OS/2 Warp 4 problem with ...
by
PascalDragon
[December 12, 2025, 08:30:23 pm]
Introducing PasBuild 1.0....
by
PascalDragon
[December 12, 2025, 08:20:32 pm]
Convert string with Key-V...
by
Bart
[December 12, 2025, 07:28:04 pm]
The TChromeTabs component...
by
1-berto
[December 12, 2025, 07:02:28 pm]
Military Grade Directives
by
Warfley
[December 12, 2025, 05:44:12 pm]
connecting to mariadb
by
marcov
[December 12, 2025, 04:13:37 pm]
TIBDataSet "Closing"? on ...
by
RedOctober
[December 12, 2025, 03:09:07 pm]
How can I make a safe app...
by
marcov
[December 12, 2025, 02:58:10 pm]
fpsockets error: 10047
by
Warfley
[December 12, 2025, 01:32:51 pm]
FPC 3.2.4-rc1 available
by
marcov
[December 12, 2025, 10:47:38 am]
[SOLVED] Lazreport. Multi...
by
Petrus Vorster
[December 12, 2025, 09:27:32 am]
Has anyone installed TeeB...
by
egsuh
[December 12, 2025, 06:34:29 am]
[SOLVED] Program compiles...
by
Schmitty2005
[December 11, 2025, 07:35:39 pm]
[SOLVED] Need help conver...
by
srvaldez
[December 11, 2025, 01:52:33 pm]
SpkToolbar custom update
by
wp
[December 11, 2025, 01:48:16 pm]
Is FPGUI still active?
by
BSaidus
[December 11, 2025, 01:25:31 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: paszlib. Determine if extraction was successful (Read 210 times)
LemonParty
Sr. Member
Posts: 391
paszlib. Determine if extraction was successful
«
on:
November 07, 2025, 12:35:03 pm »
I use TUnZipper.UnZipAllFiles to extract archive.
How to determine if extraction of all files was successful?
Logged
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11
wp
Hero Member
Posts: 13268
Re: paszlib. Determine if extraction was successful
«
Reply #1 on:
November 07, 2025, 01:11:45 pm »
The unzipper raises a lot of exceptions. So, if your unzipping procedure reaches its end without an exception it must have been successful. Untested:
Code: Pascal
[Select]
[+]
[-]
uses
Zipper
;
function
UnzipFiles
(
AZip
:
String
;
AOutputDir
:
String
;
out AErrorMsg
:
String
)
:
Boolean
;
var
UnZipper
:
TUnZipper
;
begin
Result
:
=
true
;
AErrorMsg
:
=
''
;
UnZipper
:
=
TUnzipper
.
Create
;
try
try
UnZipper
.
FileName
:
=
AZip
;
UnZipper
.
OutputPath
:
=
AOutputDir
;
UnZipper
.
Examine
;
UnZipper
.
UnZipAllFiles
;
except
on E
:
Exception
do
begin
AErrorMsg
:
=
E
.
Message
;
Result
:
=
false
;
end
;
end
;
finally
UnZipper
.
Free
;
end
;
end
;
end
.
Logged
Thaddy
Hero Member
Posts: 18524
Here stood a man who saw the Elbe and jumped it.
Re: paszlib. Determine if extraction was successful
«
Reply #2 on:
November 07, 2025, 01:35:11 pm »
Quote from: wp on November 07, 2025, 01:11:45 pm
The unzipper raises a lot of exceptions.
Oops, that needs a rewrite then.
Logged
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
paszlib. Determine if extraction was successful
TinyPortal
© 2005-2018