TempFileFolder Property

DotNetZip

Ionic Zip Library v1.9.1.6 TempFileFolder Property
ReferenceIonic.ZipZipFileTempFileFolder
Gets or sets the name for the folder to store the temporary file this library writes when saving a zip archive.
Declaration Syntax
C# Visual Basic Visual C++
public string TempFileFolder { get; set; }
Public Property TempFileFolder As String
	Get
	Set
public:
property String^ TempFileFolder {
	String^ get ();
	void set (String^ value);
}
Remarks

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.

Exceptions
Exception Condition
FileNotFoundException Thrown when setting the property if the directory does not exist.

Assembly: Ionic.Zip (Module: Ionic.Zip) Version: 1.9.1.8 (1.9.1.8)