IsolatedStorageFile.CopyFile 方法    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将现有文件复制到新文件。
重载
| CopyFile(String, String) | 
						 将现有文件复制到新文件。  | 
        	
| CopyFile(String, String, Boolean) | 
						 将现有文件复制到新文件,还可以覆盖现有文件。  | 
        	
CopyFile(String, String)
- 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
 
将现有文件复制到新文件,还可以覆盖现有文件。
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如果 overwrite 为 true,则 和 destinationFileName 可以具有相同的文件名。