将FTP目录内容下载到ios [英] Download FTP directory contents to ios

查看:123
本文介绍了将FTP目录内容下载到ios的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,假设它是http://www.jwilkthings.com/stuff。



我有一堆存储在这个文件上的.txt文件网站,即http://www.jwilkthings.com/stuff/text1.txt



我想要做的是找到一种方法在iOS下载所有这些文本文件都不知道文档名称是什么。只要我有一个文件名,我就可以手动检索它们,但是我宁愿只将它们一次全部取出,并尽可能将它们放在文档目录中。我目前使用FileZilla来上传所有的文本文件,所以我可以使用FTP。

这个问题是不使用FTP(充满性能和安全问题),并配置您的Web服务器以公开目录目录列表,您的客户可以解析。



但这不是您的问题的答案。
。如果你真的想你的iOS应用说话FTP,看看在的

这是旧的,但我只是想在iOS 5上构建它。 ListController。 m 文件中包含您要查找的代码。




I have a website, let's say it's "http://www.jwilkthings.com/stuff"

I have a bunch of .txt files stored on this website, i.e. "http://www.jwilkthings.com/stuff/text1.txt"

What I'm wanting to do is find a way in iOS to download all of those text files without knowing what the document name is. I can already retrieve them manually as long as I have a file name, but I would rather just get all of them at once and put them in the documents directory if possible. I currently use FileZilla to upload all of the text files, so I can use FTP if needed.

解决方案

The correct way to solve this problem is to not use FTP (riddled with performance and security issues), and to configure your web server to expose a table of contents directory listing that your client can parse.

But that's not an answer to your question. If you really want your iOS app to speak FTP, take a look at the SimpleFTP sample project from Apple.

It's old, but I just got it to build on iOS 5. The ListController.m file has the code you're looking for.

这篇关于将FTP目录内容下载到ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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