如何显示目录下的文件? [英] How can I display the files that are under a directory?

查看:85
本文介绍了如何显示目录下的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望它显示预设目录下的所有文件和文件夹,类似于Windows注册表编辑器。我怎么能这样做?

I want this to display all of the files and folders that are under a pre-set directory, similar to the Windows Registry Editor. How could I do this?

推荐答案

您好,

这里显示的基础知识并注意代码不处理运行应用程序的用户没有权限的文件夹。有一些方法可以解决这个问题,但首先要掌握基础知识。

The very basics are shown here and note that the code does not handle folders which the user running the app does not have permissions. There are a handful of ways to handle this but get the basics down first.

https://stackoverflow.com/questions/6239544/populate-treeview-with-file-system-directory-structure

现在以下是你做的事情的一个奇特的工作。

Now the following does a fancy job at doing what you ask.

https://www.codeproject.com/Articles/2672/My-Explorer-In-C

然后提前版本

https://github.com/ChrisRichner/TreeViewFolderBrowser


这篇关于如何显示目录下的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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