cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: obtaining information about files or folders with MLST?

From: Ellié Computing Open Source Program <opensource_at_elliecomputing.com>
Date: Thu, 19 Apr 2012 00:12:10 +0200

>From: Daniel Stenberg
>On Wed, 18 Apr 2012, Ellié Computing Open Source Program wrote:
>
>> I’d like to obtain information about a file/folder with the MLST command
>> when it is supported (it allows to get “folder-ness”, size, modification
>> time... all at once).
>
>Then end the URL with a slash and set CURLOPT_CUSTOMREQUEST to "MLST" ...
I just don't catch what it does. When I do that (I tried before sending
previous mail, and just now as well), the result is following:

FTP [ellie2-scc-ftp]: > USER ++++++
FTP [ellie2-scc-ftp]: < 331 Password required for +++++
FTP [ellie2-scc-ftp]: > PASS -------
FTP [ellie2-scc-ftp]: < 230 Logged on
FTP [ellie2-scc-ftp]: > PWD
FTP [ellie2-scc-ftp]: < 257 "/" is current directory.
FTP [ellie2-scc-ftp]: c Entry path is '/'
FTP [ellie2-scc-ftp]: > EPSV
FTP [ellie2-scc-ftp]: c Connect data stream passively
FTP [ellie2-scc-ftp]: < 229 Entering Extended Passive Mode (|||2264|)
FTP [ellie2-scc-ftp]: c Trying 192.168.1.18...
FTP [ellie2-scc-ftp]: c Server port 2264 connecting on socket 636
FTP [ellie2-scc-ftp]: c Connecting to 192.168.1.18 (192.168.1.18) port 2264
FTP [ellie2-scc-ftp]: > TYPE A
FTP [ellie2-scc-ftp]: < 200 Type set to A
FTP [ellie2-scc-ftp]: > MLST
folder-status-filters_1_0.725970950443298/dev_web/
FTP [ellie2-scc-ftp]: < 250-Listing
/folder-status-filters_1_0.725970950443298/dev_web
FTP [ellie2-scc-ftp]: < type=dir;modify=20120418220003;
/folder-status-filters_1_0.725970950443298/dev_web
FTP [ellie2-scc-ftp]: < 250 End
FTP [ellie2-scc-ftp]: c RETR response: 250

the MLST command returns its result in the control connection, with a
success code of 250, this is not handled unfortunately.

how could I read the result line (and write it to the 'WRITE FUNCTION'), and
then accept the code "250 End", to let the stuff finish?
we'd have as well to detect MLST and skip the TYPE/EPSV stuff (as MLST/MLSD
impose a particular temporary transfer type, i.e. ignoring TYPE and not
changing the value)

Regards
Armel

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-19