如何从的String []只选择隐藏文件夹? [英] How to select only hidden folder from String[]?

查看:79
本文介绍了如何从的String []只选择隐藏文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何从的String []只得到隐藏的文件夹。其实我有一个字符串数组并有表现出一些文件。有有正常和隐藏文件还,但我想尝试从这个数组只选择隐藏文件夹中。因此,任何人能帮助我吗?

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 select only hidden folder from this array. So anyone can help me?

推荐答案

创建的FileInfo 对象为每个文件并利用其目录属性来获得的DirectoryInfo 实例上,您可以检查属性属性,会告诉你,如果该目录是隐藏的。

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.

这篇关于如何从的String []只选择隐藏文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆