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
Debian removes FPC/Lazaru...
by
kupferstecher
[
Today
at 11:46:26 am]
Problems in drawing an ar...
by
simsee
[
Today
at 11:34:26 am]
Select rectangle of the i...
by
backprop
[
Today
at 11:20:42 am]
[ANN] fpGUI Toolkit v2.0....
by
Roland57
[
Today
at 11:14:36 am]
The Future of FPC
by
n7800
[
Today
at 11:10:42 am]
Form designer on MAC: Des...
by
tk
[
Today
at 11:07:28 am]
Reverting to Old AnchorDo...
by
CM630
[
Today
at 10:27:21 am]
makefiles
by
Key-Real
[
Today
at 10:04:55 am]
fpGUI Toolkit v2.0.1 has ...
by
PierceNg
[
Today
at 09:13:32 am]
[SOLVED] Sort DBGrid
by
Zvoni
[
Today
at 08:28:39 am]
Status of FPC 3.4.0 or FP...
by
robert rozee
[
Today
at 08:23:03 am]
DCPcrypt v2.0.6 — Cryptog...
by
Okoba
[
Today
at 07:47:36 am]
ThorVG - test (lightweigh...
by
elkhalafy
[
Today
at 07:11:39 am]
Old problem returns...
by
Lutz Mändle
[
Today
at 06:56:53 am]
Fixing Lazarus 4.4 IDE la...
by
dbannon
[
Today
at 05:52:05 am]
Strange Error in My Code ...
by
TYDQ
[
Today
at 01:17:35 am]
Fpcupdeluxe
by
creaothceann
[
Today
at 12:09:07 am]
; after then
by
440bx
[February 11, 2026, 10:29:20 pm]
Lazarus for Windows on aa...
by
Wallaby
[February 11, 2026, 10:21:41 pm]
Fast Canvas Library V1.05...
by
backprop
[February 11, 2026, 08:15:33 pm]
TRichMemo EM_FORMATRANGE ...
by
rvk
[February 11, 2026, 07:54:30 pm]
[SOLVED] Lazarus recompil...
by
Hartmut
[February 11, 2026, 06:00:38 pm]
Defining TDBDropDownCombo...
by
1HuntnMan
[February 11, 2026, 04:12:04 pm]
Rolling releases Lazarus[...
by
ALLIGATOR
[February 11, 2026, 03:28:46 pm]
How to determine the unkn...
by
CM630
[February 11, 2026, 03:10:40 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: paszlib. Determine if extraction was successful (Read 281 times)
LemonParty
Sr. Member
Posts: 393
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: 13352
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: 18729
To Europe: simply sell USA bonds: dollar collapses
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
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
paszlib. Determine if extraction was successful
TinyPortal
© 2005-2018