Thanks! But I guess I wasn't clear enough. I can already include all the files, in whatever directory; what I'm trying to do is include the directory entry itself, like a native zip program would do.

For example, here's the output of Zip 3.0:

C:\Temp\ztest>zip -r test2.zip WEB-INF adding: WEB-INF/ (208 bytes security) (stored 0%) <-- dir, not file adding: WEB-INF/deploy/ (208 bytes security) (stored 0%) <-- ditto adding: WEB-INF/deploy/client/ (208 bytes security) (stored 0%) adding: WEB-INF/deploy/client/rpcPolicy/ (208 bytes security) (store +d 0%) adding: WEB-INF/deploy/client/rpcPolicy/manifest.txt (208 bytes secu +rity) (deflated 4%) <-- first actual file

So it's stored the directory entities and information (including modification times) as well as the files. That's what I'm trying to emulate.

I've done some more digging around, and I'm beginning to think that IO::Compress::Zip might just not do what I want. Also, I didn't think that Archive::Zip was in the core libraries, but it looks like it has been since v 5.12 or so, maybe. (On the other hand, I have to work with some very old systems.)

I might not even need this ability for what I want to do, but the closer I can come to a Real Zip File on output, the better.


In reply to Re^2: Getting IO::Compress::Zip to include directory entries (on Windows) by hilitai
in thread Getting IO::Compress::Zip to include directory entries (on Windows) by hilitai

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.