Moves the specified file into the specified folder.
Namespace: DotNetNuke.Services.FileSystemAssembly: 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
Exception | Condition |
---|---|
System..::..ArgumentNullException | Thrown when file or destinationFolder are null. |
DotNetNuke.Services.FileSystem..::..FolderProviderException | Thrown when the underlying system throw an exception. |
DotNetNuke.Services.FileSystem..::..InvalidFileExtensionException | Thrown when the extension of the specified file is not allowed. |
DotNetNuke.Services.FileSystem..::..NoSpaceAvailableException | Thrown when the portal has no space available to store the specified file. |
DotNetNuke.Services.FileSystem..::..PermissionsNotMetException | Thrown when permissions are not met. |