cURL / Mailing Lists / curl-users / Single Mail

curl-users

Any chance of adding noclobber or no-overwrite function to curl?

From: BZT <sjwright68u_at_charter.net>
Date: Thu, 21 May 2009 22:30:30 -0400

Hi.

This is my first post to the list that's not in reply to another post.

I have been thinking about the lack of a no-overwrite function for
downloading with curl. I have puzzled out three ways to add it, if it is
feasible to do so at all.

First method -- copycat wget: add it as a flag option and change the
syntax slightly, particularly where the "-o" flag is concerned.

Second method -- add a flag. Where this one runs into a brick wall is,
perusing the man page and conceding that there are only 52 letters in
the ASCII alphabet (counting caps and lowercase together), there aren't
any single letters left. The other utility (wget) uses the -nc flag, but
to be original, I thought of something like -no for 'no-overwrite' instead.

Third method -- a configuration-only option: something that could be
added to the user's .curlrc file that, full stop, doesn't work as a
console/terminal command. It's rare, I realize, for something to be
'hidden' like that but I'm sure I've seen it done with the odd
application or two in my short time fuzzling with Linux and Unix.

Now, continuing to think positive, how do you get this addition out to
the users? An update has its pitfalls, if only insofar as there are so
many kernels etc., to write one for. A libcurl update and a patch of the
binaries, to my way of looking at it, holds more promise in terms of
simplicity and immediacy. Or maybe some step-by-step instructions on how
to shoehorn the function and flag(s) into folks' existing libcurl files.

Now I'll sit back and wait for feedback to this silly suggestion.

Have a great time of it, folks.

BZT
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-05-22