IsolatedStorageFile.CopyFile Metod

Definition

Kopierar en befintlig fil till en ny fil.

Överlagringar

Name Description
CopyFile(String, String)

Kopierar en befintlig fil till en ny fil.

CopyFile(String, String, Boolean)

Kopierar en befintlig fil till en ny fil och skriver eventuellt över en befintlig fil.

CopyFile(String, String)

Källa:
IsolatedStorageFile.cs
Källa:
IsolatedStorageFile.cs
Källa:
IsolatedStorageFile.cs
Källa:
IsolatedStorageFile.cs
Källa:
IsolatedStorageFile.cs

Kopierar en befintlig fil till en ny fil.

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

Parametrar

sourceFileName
String

Namnet på filen som ska kopieras.

destinationFileName
String

Namnet på målfilen. Det kan inte vara en katalog eller en befintlig fil.

Attribut

Undantag

sourceFileName eller destinationFileName är en sträng med noll längd, innehåller endast tomt utrymme eller innehåller ett eller flera ogiltiga tecken som definierats av GetInvalidPathChars() metoden.

sourceFileName eller destinationFileName är null.

Den isolerade butiken har stängts.

Det isolerade arkivet har tagits bort.

sourceFileName hittades inte.

sourceFileName hittades inte.

Det isolerade arkivet har tagits bort.

-eller-

Isolerad lagring är inaktiverad.

-eller-

destinationFileName Finns.

-eller-

Ett I/O-fel har inträffat.

Kommentarer

sourceFileName och destinationFileName måste ange olika filnamn. IsolatedStorageFile.CopyFile(String, String, Boolean) Använd metodens överlagring för att skriva över en befintlig fil.

Se även

Gäller för

CopyFile(String, String, Boolean)

Källa:
IsolatedStorageFile.cs
Källa:
IsolatedStorageFile.cs
Källa:
IsolatedStorageFile.cs
Källa:
IsolatedStorageFile.cs
Källa:
IsolatedStorageFile.cs

Kopierar en befintlig fil till en ny fil och skriver eventuellt över en befintlig fil.

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

Parametrar

sourceFileName
String

Namnet på filen som ska kopieras.

destinationFileName
String

Namnet på målfilen. Det kan inte vara en katalog.

overwrite
Boolean

trueom målfilen kan skrivas över; annars . false

Attribut

Undantag

sourceFileName eller destinationFileName är en sträng med noll längd, innehåller endast tomt utrymme eller innehåller ett eller flera ogiltiga tecken som definierats av GetInvalidPathChars() metoden.

sourceFileName eller destinationFileName är null.

Den isolerade butiken har stängts.

Det isolerade arkivet har tagits bort.

sourceFileName hittades inte.

sourceFileName hittades inte.

Det isolerade arkivet har tagits bort.

-eller-

Isolerad lagring är inaktiverad.

-eller-

Ett I/O-fel har inträffat.

Kommentarer

sourceFileName och destinationFileName kan ha samma filnamn om overwrite är true.

Se även

Gäller för