NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

File.MoveTo

Moves a given file to a new location and potentially a new file name. This method works across volumes.

[Visual Basic]
Public Sub MoveTo( _
   ByVal destFileName As String _
)
[C#]
public void MoveTo(
   string destFileName
);
[C++]
public: void MoveTo(
   String* destFileName
);
[JScript]
public function MoveTo(
   destFileName : String
);

Parameters

destFileName
The name of the new file to copy to.

Exceptions

Exception Type Condition
ArgumentNullException destFileName is a null reference (in Visual Basic Nothing).
ArgumentException destFileName is an empty string ("") or contains only whitespaces.
IOException An error occurs or the destination file already exists.
SecurityException The caller does not have the required permission.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Read permission for the current File object.
FileIOPermissionAccess Write permission for the current File object and destination file.

See Also

File Class | File Members | System.IO Namespace