cURL / Mailing Lists / curl-library / Single Mail

curl-library

Trouble getting a directory listing before uploading a file

From: James Housley <jim_at_thehousleys.net>
Date: Mon, 30 May 2005 15:33:55 -0400

What I need to do is after login to send NLST to get the directory
listing of the current directory. Then get another directory listing
after the final CWD before the STOR is sent to upload the file. I am
using "libcurl/7.11.1 OpenSSL/0.9.6i ipv6 zlib/1.1.3" via
CURHandle.Framework.

I have set CURLOPT_FTPLISTONLY, and played around with CURLOPT_QUOTE,
CURLOPT_PREQUOTE and CURLOPT_POSTQUOTE and decided they aren't right.
I see the CURLOPT_CUSTOMREQUEST can send a custom command fom
LIST/NLST, but I haven't gotten that working either.

It appears that I could fake it with CURLOPT_NOBODY and do 3
connections, one to just connect and get a directory listing. The
second to get the listing in the final CWD, and the third to STOR the
file. But that is really messy.

I have been searching the archives and haven't yet found anything. Any
and all help would be apperciated.

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
Do not meddle in the affairs of dragons, for you are crunchy and taste
     good with ketchup.

  • application/pkcs7-signature attachment: smime.p7s
Received on 2005-05-30