This library will create a temporary file when saving a Zip archive to a file. This file is written when calling one of the Save() methods that does not save to a stream, or one of the SaveSelfExtractor() methods.
By default, the library will create the temporary file in the directory specified for the file itself, via the Name property or via the Save(String) method.
Setting this property allows applications to override this default behavior, so that the library will create the temporary file in the specified folder. For example, to have the library create the temporary file in the current working directory, regardless where the ZipFile is saved, specfy ".". To revert to the default behavior, set this property to null (Nothing in VB).
When setting the property to a non-null value, the folder specified must exist; if it does not an exception is thrown. The application should have write and delete permissions on the folder. The permissions are not explicitly checked ahead of time; if the application does not have the appropriate rights, an exception will be thrown at the time Save() is called.
There is no temporary file created when reading a zip archive. When saving to a Stream, there is no temporary file created. For example, if the application is an ASP.NET application and calls Save() specifying the Response.OutputStream as the output stream, there is no temporary file created.
Exception | Condition |
---|---|
FileNotFoundException |
Thrown when setting the property if the directory does not exist.
|