cURL / Mailing Lists / curl-library / Single Mail


About getting file attibutes on FTP server using libcurl

From: CHEN Xiaolei A <>
Date: Thu, 26 Aug 2010 10:37:00 +0800


   I am using libcurl to implement FTP manipulations, and I got a problem when trying retrieving file attributes on FTP server.

   My solutions for retrieving file attributes listed below:
   (1) List dir and dump the result to memory
        curl_easy_setopt(curl, CURLOPT_URL, "");
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, MyMemoStruct);
        So the result (something like executing "ls -l") will be stored in memory

  (2) Parse the memory string and get file attributes like "owner", "permission", "size", etc.

   My question is:
   (1) If filename contains some special character in UTF-8 format, can the mothod above work well? If the filename become a clobber, and I use this clobber to download this file, can libcurl work well?
   (2) Is there any other way to retrieve file attributes?

   Thanks a lot.

Chen Xiaolei(С)
oambase-wtk Team
Telephone: +86 10 8477 7636



List admin:
Received on 2010-08-26