in reply to Problems with Archive::zip
Actually you misunderstood how this module works.
addDirectory method is not for adding an actual directory you currently have, it's just to sort things out inside your zip file
For example:
$zip->addDirectory('something'); $zip->writeToFileNamed('test.zip');
Would create a zip file that contain a directory named 'something' and it doesn't to exists in your system to be added to the zip file.
Add file should have added the file in question and I have to idea why it's failing for you ... again you can use it to sort things inside your zip file
For example
$zip->addDirectory('something'); $zip->addFile('C:\somefile.pl', 'something/better_name.pl'); $zip->writeToFileNamed('test.zip');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems with Archive::zip
by Martinw (Initiate) on May 18, 2010 at 15:50 UTC |