Welcome to the Xceed Community | Help
Community Search  

Question regarding ZipArchive.DefaultTempFolder and multithreading

Sort Posts: Previous Next
  •  07-24-2008, 3:49 AM Post no. 13724

    Question regarding ZipArchive.DefaultTempFolder and multithreading

    Hi community Smile 

    We are using Xceed Zip for NET 3.0.6173.0 in a ASP.NET application.

    Is the following code secure, regarding multithreading ?

    public static void ZipFiles(string [] inputFiles, string zipFilepath)
    {
    ZipArchive.DefaultTempFolder = new DiskFolder(Path.GetDirectoryName(zipFilepath));
    QuickZip.Zip(zipFilepath, true, true, false, inputFiles);
    }

    My question concerns the ZipArchive.DefaultTempFolder property !

    May I call the ZipFiles method from 2 distinct threads at the same time?

    Thanks,
    arturb

     

  •  08-05-2008, 9:19 AM Post no. 13886 in reply to 13724

    Re: Question regarding ZipArchive.DefaultTempFolder and multithreading

    You can use this method in a multi-threaded environment as long as you don’t process the same zip archive. The DefaultTempFolder will be used by all ZipArchive instances (every call to QuickZip.Zip creates one) and temp files will be created using unique file names (GUID).


    André
    Software Developer and Tech Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.