使用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.