cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Local files

From: Sigal Algranaty <sigala_at_itemfield.com>
Date: Wed, 9 Apr 2003 16:35:16 +0200

I tried it. In url.c there a section that checks the protocol type.
There is only reference to FTP/GOPHER/HTTPS/FTPS/TELNET/DICT/LDAP, and
the default is http.
And still there's an error: "Couldn't resolve host."

-----Original Message-----
From: curl-library-admin_at_lists.sourceforge.net
[mailto:curl-library-admin_at_lists.sourceforge.net] On Behalf Of Daniel
Stenberg
Sent: Wednesday, April 09, 2003 2:01 PM
To: libcurl Mailing list
Subject: Re: Local files

On Wed, 9 Apr 2003, Sigal Algranaty wrote:

> Does cUrl know how to download local files?

Yes it does.

> If I put D:\pic.jpg instead of a url, would it work, or should I add a

> curl option?

That would not be a legal URL. A URL identifying a local file should be
prefixed with file:// and that file name would be something like this:

        file:///d:/pic.jpg

(I can't recall the exact details off the top of my head.)

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
Received on 2003-04-09