curl-library
ftp: curl-library
Date: Mon, 29 Aug 2005 23:20:27 +0400
Hi.
I have a few qoestions about curl-library ability:
1. 1. What the ways to do this with libcurl? - connect to the server - get list of all files - look for modification time change - upload changed files.
2. When I try do "LIST" command for ftp protocol wia curl_easy_setopt() my application don't response :(
This is a fragment of my code:
//-------------------------------------------------------------------------------------
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config);
curl_easy_setopt(curl, CURLOPT_NOBODY, 0);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
curl_easy_setopt(curl,CURLOPT_URL, URL);
curl_easy_setopt(curl, CURLOPT_USERPWD, PASS);
res = curl_easy_perform(curl);
if (slist != NULL)
{
curl_slist_free_all (slist);
slist=NULL;
}
slist = curl_slist_append(slist, "LIST");
curl_easy_setopt(curl, CURLOPT_QUOTE, slist);
res = curl_easy_perform(curl);
//-------------------------------------------------------------------------------------
Best regards, Eugene
Received on 2005-08-29