C# 文件删除时,报 is denied 错

2020-10-09  本文已影响0人  Rinaloving

参考地址 https://stackoverflow.com/questions/15260146/file-delete-access-to-the-path-is-denied

if (File.Exists(filePath))
{
    File.SetAttributes(filePath, FileAttributes.Normal);
    File.Delete(filePath);
}
上一篇 下一篇

猜你喜欢

热点阅读