summaryrefslogtreecommitdiff
path: root/packages/paszlib
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-03-14 11:41:54 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-03-14 11:41:54 +0000
commitbbc13c86ac70b89c50a271006c301f9b13ebc01e (patch)
tree312e04c652d9f5228ff8f1b25ecdf07157d58a63 /packages/paszlib
parent97801110f087e833c12d194c342b03a8869ee1bc (diff)
downloadfpc-bbc13c86ac70b89c50a271006c301f9b13ebc01e.tar.gz
* unzipper unit basic extraction test. (related to mantis 15836)
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15015 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/paszlib')
-rwxr-xr-xpackages/paszlib/examples/extractodt.pas30
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/paszlib/examples/extractodt.pas b/packages/paszlib/examples/extractodt.pas
new file mode 100755
index 0000000000..f1f684a629
--- /dev/null
+++ b/packages/paszlib/examples/extractodt.pas
@@ -0,0 +1,30 @@
+program ExtractODT;
+// minimal function test zipper unit (related to mantis 15836)
+
+{$mode objfpc}{$H+}
+
+Uses Zipper,sysutils;
+
+procedure usage;
+begin
+ Writeln('ExtractOdt <filename>');
+ halt;
+end;
+
+var unzipper : TUnzipper;
+ EDir,
+ FileName : string;
+begin
+ if paramcount<1 then
+ Usage;
+ FileName:=paramstr(1);
+ if not fileexists(FileName) then
+ Usage;
+ edir:=extractfilename(filename)+'extractiondir';
+ mkdir(edir);
+ unzipper:=TUnzipper.create;
+ unzipper.FileName:=FileName;
+ unzipper.outputpath:=edir;
+ unzipper.UnzipAllFiles;
+
+end. \ No newline at end of file