curl-users
Re: Re: cURL TODO : 15.3 prevent file overwriting
Date: Wed, 28 May 2014 05:02:35 +0000 (GMT)
>> The list of options is very extensive and I was not able to find any suitable
>> option for this.
>>
>> Currently used '!' as the option with long name as 'no_clobber'.
>We don't necessarily even need a short option. They are precious commodities,
>and if noone has needed this option after 16 years, it's probably not going to
>be popular enough to deserve one.
My intention for providing a short option was to cover all combinations in which
(-o and -O) options are used. But, it is okay if short option is not required. I will
provide only long option --clobber whose false value i.e. (--no-clobber) will
be useful for us to prevent file overwriting when used with (-o and -O) options.
>> I can not use "no-clobber" because "no-option" is used for disabling the
> >boolean options.
> Why not create a "clobber" option that is true by default? Then --no-clobber
> will work fine and as expected.
I will provide only long option --clobber whose false value i.e. (--no-clobber) will
be useful for us to prevent file overwriting when used with (-o and -O) options.
Now the --no-clobber option can be used in following ways:
- curl -O --no-clobber http://curl.haxx.se/docs/manpage.html
- curl -o <manpage.html> --no-clobber http://curl.haxx.se/docs/manpage.html
Please share your views, I will create a patch and share it once confirmed.
Thanks & Regards,
Deepak Singh
|
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
