Create text file and make it hidden and readOnly c#
How to Create tex开发者_开发技巧t file and make it's Properties Hidden and Archive and ReadOnly using C#?
FileStream fs = File.Create("test.txt");
fs.Close();
File.SetAttributes(
"test.txt",
FileAttributes.Archive |
FileAttributes.Hidden |
FileAttributes.ReadOnly
);
精彩评论