Επεξεργασία

Κοινή χρήση μέσω


IsolatedStorageFile.MoveDirectory(String, String) Method

Definition

Moves a specified directory and its contents to a new location.

public:
 void MoveDirectory(System::String ^ sourceDirectoryName, System::String ^ destinationDirectoryName);
public void MoveDirectory (string sourceDirectoryName, string destinationDirectoryName);
[System.Runtime.InteropServices.ComVisible(false)]
public void MoveDirectory (string sourceDirectoryName, string destinationDirectoryName);
member this.MoveDirectory : string * string -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.MoveDirectory : string * string -> unit
Public Sub MoveDirectory (sourceDirectoryName As String, destinationDirectoryName As String)

Parameters

sourceDirectoryName
String

The name of the directory to move.

destinationDirectoryName
String

The path to the new location for sourceDirectoryName. This cannot be the path to an existing directory.

Attributes

Exceptions

sourceFileName or destinationFileName is a zero-length string, contains only white space, or contains one or more invalid characters defined by the GetInvalidPathChars() method.

sourceFileName or destinationFileName is null.

The isolated store has been closed.

The isolated store has been disposed.

sourceDirectoryName does not exist.

The isolated store has been removed.

-or-

Isolated storage is disabled.

-or-

destinationDirectoryName already exists.

-or-

sourceDirectoryName and destinationDirectoryName refer to the same directory.

Remarks

sourceFileName and destinationFileName must specify different directory names.

Applies to

See also