c#隐藏文件和取消问题

FileAttributes fa = File.GetAttributes(filename);
File.SetAttributes(filename, FileAttributes.Hidden | fa);//隐藏文件,并且保持文件以前的属性
File.SetAttributes( filename, fa & (~FileAttributes.Hidden) );//取消隐藏属性
posted @ 2009-08-18 15:43  oraclejava  阅读(689)  评论(0)    收藏  举报