IsolatedStorageFile.CopyFile 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将现有文件复制到新文件。
重载
| 名称 | 说明 |
|---|---|
| CopyFile(String, String) |
将现有文件复制到新文件。 |
| CopyFile(String, String, Boolean) |
将现有文件复制到新文件,并选择性地覆盖现有文件。 |
CopyFile(String, String)
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
将现有文件复制到新文件。
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)
参数
- sourceFileName
- String
要复制的文件的名称。
- destinationFileName
- String
目标文件的名称。 这不能是目录或现有文件。
- 特性
例外
sourceFileName 或 destinationFileName 为零长度字符串,仅包含空格,或包含方法定义的 GetInvalidPathChars() 一个或多个无效字符。
sourceFileName 或 destinationFileName 为 null.
隔离存储已关闭。
已释放隔离存储。
sourceFileName 找不到。
sourceFileName 找不到。
注解
sourceFileName 并且 destinationFileName 必须指定不同的文件名。
IsolatedStorageFile.CopyFile(String, String, Boolean)使用方法重载覆盖现有文件。
另请参阅
适用于
CopyFile(String, String, Boolean)
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
将现有文件复制到新文件,并选择性地覆盖现有文件。
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)
参数
- sourceFileName
- String
要复制的文件的名称。
- destinationFileName
- String
目标文件的名称。 这不能是目录。
- overwrite
- Boolean
true 如果可以覆盖目标文件,则为 ;否则,为 false.
- 特性
例外
sourceFileName 或 destinationFileName 为零长度字符串,仅包含空格,或包含方法定义的 GetInvalidPathChars() 一个或多个无效字符。
sourceFileName 或 destinationFileName 为 null.
隔离存储已关闭。
已释放隔离存储。
sourceFileName 找不到。
sourceFileName 找不到。
注解
sourceFileName如果为 destinationFileName,则overwrite其文件名true可能相同。