简体   繁体   English

从FTP服务器将目录/子目录下载到ios应用程序文件夹

[英]Downloading a directory/subdirectory from the FTP server to ios application folder

i am creating an application which requires me to download & sync all the data on the FTP directory to the ios application's document directory. 我正在创建一个应用程序,要求我将FTP目录上的所有数据下载并同步到ios应用程序的文档目录。 I found many examples like apple's sample FTP code : https://developer.apple.com/library/ios/samplecode/SimpleFTPSample/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009243-Intro-DontLinkElementID_2 我发现了许多示例,例如苹果的示例FTP代码: https : //developer.apple.com/library/ios/samplecode/SimpleFTPSample/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009243-Intro-DontLinkElementID_2

FTPhelper class : FTPhelper类:

https://github.com/erica/iphone-3.0-cookbook-/tree/master/C13-Networking/15-FTP%20Helper https://github.com/erica/iphone-3.0-cookbook-/tree/master/C13-Networking/15-FTP%20Helper

& some others as well. 以及其他一些。 But No one is suitable to download & sync all the data from server to my document directory. 但是没有人适合将所有数据从服务器下载并同步到我的文档目录。 I am able to download the files one by one but How to download a complete directory ? 我可以一个接一个地下载文件,但是如何下载完整目录? Is there any way for this? 有什么办法吗?

I found the library for chilkat here : http://www.chilkatsoft.com/chilkatftp.asp 我在这里找到了chilkat库: http : //www.chilkatsoft.com/chilkatftp.asp

I tested it to synchronise the folder & it works successfully. 我测试了它以同步文件夹并成功运行。 But it is paid $149 . 但这笔费用为149美元。 Cost is very high. 成本很高。 Is there any other alternative for this? 还有其他选择吗? Or any other way by which i can achieve the same? 或任何其他方式可以达到相同的目的?

I found some other questions on this site but they haven't provided a proper solution. 我在此网站上发现了其他一些问题,但是他们没有提供适当的解决方案。 Please show me the correct direction. 请告诉我正确的方向。 Even if i have to write code myself for the sync then please tell me how i should do it. 即使我必须自己编写代码以进行同步,也请告诉我我该怎么做。

Any help would be appreciated. 任何帮助,将不胜感激。

最简单的解决方案是在设备上创建完全相同的目录树,并使用队列下载每个文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM