Correct way to save zip file after replacing member?

Discussion in 'Perl Misc' started by david.karr, Apr 7, 2010.

  1. david.karr

    david.karr Guest

    I've written a short utility script to replace a member in a zip file,
    using the Archive::Zip module. After calling "updateMember()", I'm
    pretty sure I need to do something else to "finish" this, perhaps just
    writing the file out. Assuming my script has the original file name
    and the "Zip" object, what are the steps I should follow to write out
    this change to the original file name? I'm testing this on Cygwin,
    but it will need to work on Mac and Linux also (probably not an
    issue). I've read the Archive::Zip doc page, but I haven't seen
    anything that clearly says what I need to do here.
     
    david.karr, Apr 7, 2010
    #1
    1. Advertisements

  2. david.karr

    Steve C Guest

    david.karr wrote:
    > I've written a short utility script to replace a member in a zip file,
    > using the Archive::Zip module. After calling "updateMember()", I'm
    > pretty sure I need to do something else to "finish" this, perhaps just
    > writing the file out. Assuming my script has the original file name
    > and the "Zip" object, what are the steps I should follow to write out
    > this change to the original file name? I'm testing this on Cygwin,
    > but it will need to work on Mac and Linux also (probably not an
    > issue). I've read the Archive::Zip doc page, but I haven't seen
    > anything that clearly says what I need to do here.


    From the doc, it looks like you want the overwrite method.
     
    Steve C, Apr 7, 2010
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    2,097
  2. HARI OM
    Replies:
    0
    Views:
    17,938
    HARI OM
    May 3, 2005
  3. sunil_varma
    Replies:
    1
    Views:
    1,631
  4. Dave Kuhlman

    ANN: zip-ls -- Zip file listing program

    Dave Kuhlman, Jul 19, 2003, in forum: Python
    Replies:
    0
    Views:
    537
    Dave Kuhlman
    Jul 19, 2003
  5. abcd
    Replies:
    7
    Views:
    801
    Edward Elliott
    May 1, 2006
  6. majj81
    Replies:
    0
    Views:
    503
    majj81
    May 31, 2006
  7. Twig
    Replies:
    1
    Views:
    263
    A. Sinan Unur
    Jan 27, 2006
  8. MoshiachNow

    Archive::Zip - zip file has "invalid" format

    MoshiachNow, Oct 5, 2006, in forum: Perl Misc
    Replies:
    1
    Views:
    318
Loading...