Sign in Join
Wiki copytemporary

FreePascalArchivePackage: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## About
22
33This is a conversion of TurboPower Software's Abbrevia library for the Free Pascal Compiler. Abbrevia is a compression toolkit that supports PKZIP 4, Microsoft CAB, TAR, & gzip formats. The package contains visual components that simplify the manipulation of ZIP files.
44
55Status: Alpha, ie it needs testing.
66
77This package was created and generously made available to the open source community by [TurboPower Software](http://sourceforge.net/projects/tpabbrevia/).
88
99License: [MPL 1.1](http://www.mozilla.org/MPL/MPL-1.1.html).
1010
1111## Download
1212
1313The latest release of FpArchive can be found on the [Lazarus CCR Files page](http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=98986&release_id=478029).
1414
1515Outdated: Getting the latest source from CVS. Only svn ("Subversion") is being used by now. CVS is no longer being used.
1616
17-`cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lazarus-ccr login`
17+```text
18+cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lazarus-ccr login
19+```
1820
1921(press the Enter key when prompted for a password)
2022
21-`cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lazarus-ccr co fparchive`
23+```text
24+cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lazarus-ccr co fparchive
25+```
2226
2327This package is also available from the Free Pascal Compiler CVS in projects/contrib/abbrevia
2428
2529## Dependencies
2630
2731Small amounts of 386 assembler.
2832
2933## Usage
3034
31351\. For your project open "Project-\>Compiler Options-\>Other unit files" and add the path to the FPArchive units
3236
33372\. In the "uses" clause of your unit add AbBase, AbBrowse, AbZBrows, AbUnzper, AbArcTyp
3438
35393\. Create an unzip object:
3640
3741``` pascal
3842UnZip := TAbUnZipper.Create(nil);
3943```
4044
41454\. Set the directory where you want to extract the files to:
4246
4347``` pascal
4448UnZip.BaseDirectory := '/path/to/extract';
4549```
4650
47515\. To restore directories structure (optional) add this line:
4852
4953``` pascal
5054UnZip.ExtractOptions := [eoCreateDirs, eoRestorePath];
5155```
5256
53576\. Try to extract all CSV files (for example) from an archive file:
5458
5559``` pascal
5660try
5761 UnZip.FileName := '/file/to/extract.zip';
5862 UnZip.ExtractFiles('*.csv');
5963except
6064 on E: Exception do
6165 begin
6266 //some error handling
6367 end;
6468end;
6569```
6670
67717\. Free the created object:
6872
6973``` pascal
7074UnZip.Free;
7175```
7276
7377## See also
7478
7579- [[paszlib]] is built into FPC/Lazarus. Supports zipping/unzipping .zip files.
7680
7781---
7882*From the Free Pascal wiki, page "FreePascalArchivePackage", as it stood on 2021-03-22 after a change by Alextpp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
7983Category: Components
8084Category: Lazarus-CCR

Back to history