使用libcurl下载目录中的所有文件 [英] Downloading all files in directory using libcurl

查看:1416
本文介绍了使用libcurl下载目录中的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是libcurl的新手,并找到一种从ftp服务器下载单个文件的方法。现在我的要求是下载所有文件在一个目录,我猜它不支持libcurl。建议libcurl如何下载目录中的所有文件,或者是否有类似libcurl的其他库?

I am new to the libcurl and found a way to download a single file from the ftp server. Now my requirement is to download all files in a directory and i guess it was not supported by libcurl. Kindly suggest on libcurl how to download all files in directory or is there any other library similar to libcurl?

提前感谢。

推荐答案

您需要FTP服务器上的文件列表。这不直接,因为每个FTP服务器可能返回不同格式的文件列表...

You need the list of files on the FTP server. Which isn't straightforward as each FTP server might return a different format of file listing...

无论如何, ftpgetresp.c 示例显示了一种方法,我想。 FTP Custom CUSTOMREQUEST 建议另一种方式。

Anyway, the ftpgetresp.c example shows a way to do it, I think. FTP Custom CUSTOMREQUEST suggests another way.

这篇关于使用libcurl下载目录中的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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