如何获取我的远程目录树 [英] How to get the Tree of my Remote Directory

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

问题描述

如何获取FTPDirectory的树。

我的FTPDirectory包含文件目录和子目录。

解决方案

你有自己递归读取文件夹 - FTP没有提供任何同时读取文件夹内容和子文件夹的机制。



但这并不困难:只是读取文件夹,并通过那些作为目录返回的文件进行递归。构建树结构是更难的部分! :笑:

how do i get the tree of my FTPDirectory.
My FTPDirectory consists of files directories and sub directories.

解决方案

You have to read the folders recursively yourself - FTP does not provide any mechanism for reading folder content, and subfolders at the same time.

But it isn''t difficult: just read the folder, and recurse through those that come back as directories. Building the tree structure is the harder part! :laugh:


这篇关于如何获取我的远程目录树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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