C# 更改文件只读属性 - [C#]

来源:互联网 发布:福州淘宝模特 编辑:程序博客网 时间:2024/06/06 06:37

private void SetFileAttributes(string aFilePath)
{
     if (File.GetAttributes(aFilePath).ToString().IndexOf("ReadOnly") != -1)
     {
File.SetAttributes(aFilePath, FileAttributes.Normal);
     }
}

 

 

http://skywaitforyou.blogbus.com/logs/57613719.html