Downloads the specified file.

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

Syntax

C#
public virtual void WriteFileToResponse(
	IFileInfo file,
	ContentDisposition contentDisposition
)
Visual Basic
Public Overridable Sub WriteFileToResponse ( 
	file As IFileInfo,
	contentDisposition As ContentDisposition
)

Parameters

file
Type: DotNetNuke.Services.FileSystem..::..IFileInfo
The file to download.
contentDisposition
Type: DotNetNuke.Services.FileSystem..::..ContentDisposition
Indicates how to display the document once downloaded.

Implements

IFileManager..::..WriteFileToResponse(IFileInfo, ContentDisposition)

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThrown when file is null.
DotNetNuke.Services.FileSystem..::..PermissionsNotMetExceptionThrown when permissions are not met.

See Also