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
TFPHTTPServer DDoS protec...
by
LemonParty
[
Today
at 12:54:23 pm]
var vs out
by
creaothceann
[
Today
at 12:46:08 pm]
Is it possible to communi...
by
LemonParty
[
Today
at 12:33:18 pm]
enable easy marker moveme...
by
Paolo
[
Today
at 12:10:00 pm]
Unleashed Pascal (async/a...
by
creaothceann
[
Today
at 12:09:09 pm]
Identify network devices
by
LemonParty
[
Today
at 11:53:27 am]
MOVED: soucis scrollbars ...
by
Martin_fr
[
Today
at 11:09:38 am]
soucis scrollbars V4.8 ?
by
Martin_fr
[
Today
at 11:08:13 am]
Star Wars Galaxian
by
PierceNg
[
Today
at 10:37:08 am]
[closed] Is case for stri...
by
egsuh
[
Today
at 10:27:17 am]
Automatic generation of *...
by
dbannon
[
Today
at 09:00:50 am]
Gtk3 becomes default widg...
by
dbannon
[
Today
at 08:44:10 am]
TurboBird for FireBird 5
by
laguna
[
Today
at 07:45:04 am]
Bugs caused by the weathe...
by
dsiders
[
Today
at 04:40:59 am]
[Solved[ How to define th...
by
jamie
[
Today
at 02:33:13 am]
Lazarus Bugfix Release 4....
by
moinsen
[
Today
at 12:57:37 am]
Lazarus IDE plugin that i...
by
BSaidus
[August 10, 2026, 11:21:20 pm]
Is it timing of a dataset...
by
1HuntnMan
[August 10, 2026, 09:41:05 pm]
Dataset EnableControls/Di...
by
1HuntnMan
[August 10, 2026, 09:31:58 pm]
Application triggers mess...
by
JanRoza
[August 10, 2026, 09:29:03 pm]
[SOLVED] TTL Record Count...
by
1HuntnMan
[August 10, 2026, 09:21:46 pm]
how to connect to mariadb...
by
eldonfsr
[August 10, 2026, 07:38:05 pm]
How get listy of FieldDat...
by
eldonfsr
[August 10, 2026, 06:19:37 pm]
PasGuard – Code Protectio...
by
pasguard
[August 10, 2026, 05:32:53 pm]
TyControls: a custom-draw...
by
Antek
[August 10, 2026, 05:20:29 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: paszlib. Determine if extraction was successful (Read 457 times)
LemonParty
Hero Member
Posts: 603
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: 13645
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: 19606
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