cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: dowload a not existing file

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 2 Jan 2002 09:39:14 +0100 (MET)

On Wed, 26 Dec 2001, raoul cridlig wrote:

[sorry for not having replied earlier, I've been away from my mail the last
two weeks something]

> how to prevent from creating an empty local file when I try to download a
> non existing remote file ?

Well, you know the file exists when your callback gets called. Delay the file
creation until the callback is called the first time...

That's how curl tool itself does it.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-01-02