Moves the specified file into the specified folder.

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

Syntax

C#
public virtual IFileInfo MoveFile(
	IFileInfo file,
	IFolderInfo destinationFolder
)
Visual Basic
Public Overridable Function MoveFile ( 
	file As IFileInfo,
	destinationFolder As IFolderInfo
) As IFileInfo

Parameters

file
Type: DotNetNuke.Services.FileSystem..::..IFileInfo
The file to move.
destinationFolder
Type: DotNetNuke.Services.FileSystem..::..IFolderInfo
The folder where to move the file to.

Return Value

An IFileInfo with the information of the moved file.

Implements

IFileManager..::..MoveFile(IFileInfo, IFolderInfo)

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThrown when file or destinationFolder are null.
DotNetNuke.Services.FileSystem..::..FolderProviderExceptionThrown when the underlying system throw an exception.
DotNetNuke.Services.FileSystem..::..InvalidFileExtensionExceptionThrown when the extension of the specified file is not allowed.
DotNetNuke.Services.FileSystem..::..NoSpaceAvailableExceptionThrown when the portal has no space available to store the specified file.
DotNetNuke.Services.FileSystem..::..PermissionsNotMetExceptionThrown when permissions are not met.

See Also