Szerkesztés

Megosztás a következőn keresztül:


IsolatedStorageFile.MoveFile(String, String) Method

Definition

Moves a specified file to a new location, and optionally lets you specify a new file name.

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

Parameters

sourceFileName
String

The name of the file to move.

destinationFileName
String

The path to the new location for the file. If a file name is included, the moved file will have that name.

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.

sourceFileName was not found.

The isolated store has been removed.

-or-

Isolated storage is disabled.

Remarks

This method does not throw an exception if sourceFileName and destinationFileName are the same.

Applies to

See also