设置文件属性--C#点滴积累

引用命名空间

Using system.IO;

经常使用的属性:Readonly只读、Normal正常

C#语句为:

File.SetAttributes(path, FileAttributes.Readonly);//path为文件路径

原文地址:https://www.cnblogs.com/mifeng/p/3446017.html