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
To DebugLn or not to Debu...
by
CM630
[
Today
at 03:03:53 pm]
Fpcupdeluxe
by
DonAlfredo
[
Today
at 02:20:26 pm]
Trayslate 1.5.0 - Free tr...
by
AlexanderT
[
Today
at 02:18:28 pm]
TlsLib4Pascal
by
Xor-el
[
Today
at 02:16:41 pm]
Strangely - Not a questio...
by
J-G
[
Today
at 02:15:12 pm]
'ReadStr' ?
by
Thaddy
[
Today
at 02:08:25 pm]
enable easy marker moveme...
by
Paolo
[
Today
at 01:30:39 pm]
Why does Free Pascal use ...
by
marcov
[
Today
at 01:11:48 pm]
[UNSOLVED] Splitting an i...
by
paweld
[
Today
at 09:58:08 am]
Error installing EyeCandy...
by
JuhaManninen
[
Today
at 08:46:00 am]
var vs out
by
creaothceann
[
Today
at 06:38:45 am]
Lazarus undead repository...
by
CM630
[August 11, 2026, 11:40:09 pm]
LRS Explorer
by
CM630
[August 11, 2026, 11:33:24 pm]
Identify network devices
by
Warfley
[August 11, 2026, 10:55:13 pm]
The best name for procedu...
by
J-G
[August 11, 2026, 07:49:19 pm]
Lazarus Bugfix Release 4....
by
geraldholdsworth
[August 11, 2026, 04:55:42 pm]
[Solved[ How to define th...
by
Mike.Cornflake
[August 11, 2026, 03:42:11 pm]
Dataset EnableControls/Di...
by
Mike.Cornflake
[August 11, 2026, 03:37:42 pm]
Debugging in a real termi...
by
Martin_fr
[August 11, 2026, 02:59:09 pm]
how to bring in view the ...
by
Aruna
[August 11, 2026, 02:33:55 pm]
Is it possible to communi...
by
dbannon
[August 11, 2026, 02:15:44 pm]
TFPHTTPServer DDoS protec...
by
LemonParty
[August 11, 2026, 12:54:23 pm]
Unleashed Pascal (async/a...
by
creaothceann
[August 11, 2026, 12:09:09 pm]
MOVED: soucis scrollbars ...
by
Martin_fr
[August 11, 2026, 11:09:38 am]
soucis scrollbars V4.8 ?
by
Martin_fr
[August 11, 2026, 11:08:13 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: paszlib. Determine if extraction was successful (Read 458 times)
LemonParty
Hero Member
Posts: 607
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: 13646
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: 19607
Glad to be alive.
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
Any "programmer" that knows only one programming language is not a programmer
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
paszlib. Determine if extraction was successful
TinyPortal
© 2005-2018