Xceed .NET Libraries Documentation
MoveTo(AbstractFile,Boolean) Method


Xceed.FileSystem Assembly > Xceed.FileSystem Namespace > AbstractFile Class > MoveTo Method : MoveTo(AbstractFile,Boolean) Method
An AbstractFile object into which the contents of the item will be moved. Cannot be a null reference (Nothing in Visual Basic).
true if existing items in the destination should be replaced; false otherwise.
Moves the contents of the AbstractFile object to the target AbstractFile object.
Syntax
'Declaration
 
Public Overloads Function MoveTo( _

   ByVal destinationFile As AbstractFile, _

   ByVal replaceIfExists As Boolean _

) As FileSystemItem
'Usage
 
Dim instance As AbstractFile

Dim destinationFile As AbstractFile

Dim replaceIfExists As Boolean

Dim value As FileSystemItem

 

value = instance.MoveTo(destinationFile, replaceIfExists)

Parameters

destinationFile
An AbstractFile object into which the contents of the item will be moved. Cannot be a null reference (Nothing in Visual Basic).
replaceIfExists
true if existing items in the destination should be replaced; false otherwise.

Return Value

A FileSystemItem object that represents the newly moved item.
Remarks

If the physical file specified by destinationFile does not exist, it is created.

FileSystemItem.ApplyPropertiesTo is called on the destination item; therefore, the attributes and dates of the original item are applied to the destination item.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AbstractFile Class
AbstractFile Members
Overload List