curl-library
Is there a canonical callback implementation for 'remote thingy exists'?
Date: Fri, 1 Oct 2010 14:34:33 -0700
Hi;
My limited understanding of libcurl leads me to conclude that to create a 'remote file or directory exists' function i want to create a 'do nothing' callback.
The docs indicate that it should return a number different then what is getting passed into it as a filesize for the remote file and this will cause the curl_easy_perform() to abort.
However, i am a bit unsure as to what it should return, it seems like it should be any negative number.
I reach this conclusion because a file has a size of 0 or greater and i wont always know in advance how large the file is.
But I dont know how a directory is sized, so i am uncertain as to what would be an appropriate canonical number to return that would work in all circumstances.
I also want to avoid downloading anything in this circumstance, because i have no interest in the content of the files or directories, i just want to get the existence answer as frugally as possible.
What do the rest of you do?
tnx!
johnu
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-01