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
$ifdef highlighting
by
440bx
[
Today
at 04:15:27 am]
Need help with compiling ...
by
nikel
[
Today
at 04:05:58 am]
Need help to build FPC fo...
by
dbannon
[
Today
at 04:00:40 am]
Need help converting a C+...
by
440bx
[
Today
at 03:44:41 am]
fishing problem ;)
by
speter
[
Today
at 03:20:14 am]
Anchoring controls with d...
by
jamie
[
Today
at 02:54:45 am]
Recomendations for conver...
by
egsuh
[
Today
at 02:36:32 am]
Hints in TTrayIcon
by
dbannon
[
Today
at 02:11:20 am]
Possible LMAX Disruptor (...
by
jamie
[
Today
at 12:41:14 am]
Just Curious: When has an...
by
Martin_fr
[December 04, 2025, 11:28:44 pm]
[SOLVED] Assembler error ...
by
yurets_z
[December 04, 2025, 11:18:23 pm]
Cannot find Online Packag...
by
dseligo
[December 04, 2025, 10:57:42 pm]
TMSSQLConnection in MacOS...
by
zeljko
[December 04, 2025, 10:29:17 pm]
Compiled package
by
Ed78z
[December 04, 2025, 10:26:14 pm]
ddebian 12 input err!
by
PascalDragon
[December 04, 2025, 09:39:53 pm]
unusual static FPC
by
PascalDragon
[December 04, 2025, 09:38:46 pm]
How to load read large CS...
by
Nimbus
[December 04, 2025, 08:29:24 pm]
Lazarus IDE problem?
by
BrunoK
[December 04, 2025, 05:52:48 pm]
Qt6 / X11: problem with G...
by
zeljko
[December 04, 2025, 04:18:33 pm]
How to use nested classes
by
440bx
[December 04, 2025, 01:59:08 pm]
Qt6 / X11 session: strang...
by
AlexTP
[December 04, 2025, 01:04:31 pm]
TShellListView empty spac...
by
jamie
[December 04, 2025, 12:20:14 pm]
Tool to create Windos set...
by
marcov
[December 04, 2025, 11:35:30 am]
IDE Watch Window colors (...
by
Martin_fr
[December 04, 2025, 11:23:38 am]
Why this code is working ...
by
Martin_fr
[December 04, 2025, 11:07:08 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: paszlib. Determine if extraction was successful (Read 206 times)
LemonParty
Sr. Member
Posts: 388
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: 13264
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: 18475
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