利用.NET中的File.Copy方法

命名空间:System.IO

重载列表:Copy(string sourceFilePath,string targetFilePath)

     sourceFilePath:要复制的文件路径。

     targetFilePath:目标文件的路径,不能是目录和现有的文件

     如果目标文件已经存在,会产生IOException

      

     Copy(string sourceFilePath,string targetFilePath,bool overwrite)

     sourceFilePath:要复制的文件路径。

     targetFilePath:目标文件的路径,不能是目录

     overwrite :true表示可以覆盖目标文件,false表示不能覆盖目标文件

     

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2021-11-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
  • 2021-11-01
  • 2021-07-01
相关资源
相似解决方案