Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Which Event is triggered when calling ZipArchiv.EndUpdate()?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19664 |

    I’m doing some batch updates and use ZipArchiv.BeginUpdate() and EndUpdate(). I want to show the progress of EndUpdate() in a progress bar. Is this possible? I tried to set the FileSystemEvents parameter but the events are never triggered. Where is the problem? I still use v1.0. Here’s my code:

    FileSystemEvents events = new FileSystemEvents();
    events.ByteProgression += new ByteProgressionEventHandler(events_ByteProgression);
    events.ItemProgression += new ItemProgressionEventHandler(events_ItemProgression);
    archiv.EndUpdate(events, null); // userdata = null, is that ok?

    Let me ask you one more question. Which maximum size can an archiv reach, when I use batch updates. I guess it’s limited by the memory of the system?

    Thanks in advance.

    Imported from legacy forums. Posted by StevieB (had 2739 views)

    User (Old forums)
    Member
    Post count: 23064

    My first guess that the added files are stored in memory was wrong. I did some tests and I noticed that the files are temporary stored in the temp-folder of the users profile. The problem is, that there is not enough disk space. Is it possible to change the path of that temporary folder?

    Imported from legacy forums. Posted by StevieB (had 165 views)

    User (Old forums)
    Member
    Post count: 23064

    First, you need to pass the “events” object to every operation you do in the Begin/EndInit block. Then the events should be fired as each operation is done.

    Second, you can set the TempFolder property on the ZipArchive to a MemoryFile object. The temporary file will then be created in memory, and the size of it will be limited by the system available memory, so make sure that you don’t process big archive.

    Imported from legacy forums. Posted by André (had 3568 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.