How to select only hidden folder from String[]?

前端 未结 2 1353
长情又很酷
长情又很酷 2021-01-28 09:48

I want to know how to get only hidden folder from String[]. Actually I have one string array and there show some files. There have normal and hidden files also but I want to try

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-28 10:32

    Create FileInfo object for each file and the use its Directory property to get a DirectoryInfo instance on which you can check the Attributes property that will tell you if the directory is hidden.

提交回复
热议问题