开发者

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
   );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜