Extracts the files and folders contained in the specified zip file to the specified folder.

Namespace: DotNetNuke.Services.FileSystem
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public virtual int UnzipFile(
	IFileInfo file,
	IFolderInfo destinationFolder,
	IList<string> invalidFiles
)
Visual Basic
Public Overridable Function UnzipFile ( 
	file As IFileInfo,
	destinationFolder As IFolderInfo,
	invalidFiles As IList(Of String)
) As Integer

Parameters

file
Type: DotNetNuke.Services.FileSystem..::..IFileInfo
The file to unzip.
destinationFolder
Type: DotNetNuke.Services.FileSystem..::..IFolderInfo
The folder to unzip to.
invalidFiles
Type: System.Collections.Generic..::..IList<(Of <(<'String>)>)>
Files which can't exact.

Return Value

Total files count in the zip file.

Implements

IFileManager..::..UnzipFile(IFileInfo, IFolderInfo, IList<(Of <<'(String>)>>))

Exceptions

ExceptionCondition
System..::..ArgumentExceptionThrown when file is not a zip compressed file.
System..::..ArgumentNullExceptionThrown when file or destination folder are null.

See Also