判断方法:

DirectoryInfo di = new DirectoryInfo(path);
if ((di.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden)
          //为隐藏的

同理可以判断目录是否为只读(ReadOnly)或者系统(System)等其他属性。

相关文章:

  • 2022-02-24
  • 2021-12-03
  • 2022-12-23
  • 2022-02-13
  • 2021-12-02
  • 2022-02-05
  • 2021-10-24
猜你喜欢
  • 2021-11-28
  • 2022-01-17
  • 2022-01-20
  • 2022-01-24
  • 2021-12-04
  • 2022-02-10
  • 2022-12-23
相关资源
相似解决方案