使用libcurl下载目录中的所有文件 [英] Downloading all files in directory using 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屋!