获取驱动器的容器 [英] get container of a drive

查看:68
本文介绍了获取驱动器的容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

如何获得文件夹驱动器的容器? (所有内容,例如隐藏文件或文件夹)

例如,在我的驱动器中,我有3个文件和2个文件夹,我想通过C#代码获得这些名称.

谢谢.

Hi everybody!

How can I get the container of a drive of a folder? (Everything such as a hidden file or a folder)

for example in my drive i have three files and 2 folders i wanna get those names by c# codes.

thank u.

推荐答案

尝试使用 ^ ]类.

特别是 DirectoryInfo.EnumerateDirectories方法 [DirectoryInfo.EnumerateFiles方法 [ ^ ]
Try using the DirectoryInfo[^] class.

Especially DirectoryInfo.EnumerateDirectories Method [^] and DirectoryInfo.EnumerateFiles Method [^]


这篇关于获取驱动器的容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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