C# File.Copy 报错:IOException: Could not create file “...xxxxpath...“. File already exists.

问题描述

平台:安卓手机(windows 也会报错)
error: IOException: Could not create file "...xxxxpath...". File already exists.
在这里插入图片描述

解决办法

在Copy之前判断是否已存在文件,若存在则删除:

![在这里插入图片描述](https://img-blog.csdnimg.cn/de9b3da2df444d1e84cc3d2ad471f56a.pn

猜你喜欢

转载自blog.csdn.net/qq_36804363/article/details/127684229