Creating hidden folders

前端 未结 5 1066
-上瘾入骨i
-上瘾入骨i 2020-12-13 17:52

Is there any way that I can programmatically create (and I guess access) hidden folders on a storage device from within c#?

5条回答
  •  感动是毒
    2020-12-13 18:06

    CreateHiddenFolder(string name)  
    {  
      DirectoryInfo di = new DirectoryInfo(name);  
      di.Create();  
      di.Attributes |= FileAttributes.Hidden;  
    }  
    

提交回复
热议问题