Update an entry in the archive

Jan 23, 2013 at 12:02 PM

Hallo,

I would like to be able to update an entry in the archive. Let's say that my archive contains the file hallo.txt and this file contains the string "hallo". I would like to edit the content of the file and save it.

I tried this but does not work:

 

        public void UpdateEntry(string entryName, string entryContent)
        {
            using (_zipFile)
            {
                _zipFile.CompressionLevel = Ionic.Zlib.CompressionLevel.BestCompression;
                _zipFile.UpdateEntry(entryName, entryContent);
                _zipFile.Save();
               
            }
        }