LibCurl and FileTime

BlitzMax Forums/BlitzMax Programming/LibCurl and FileTime

Garfield(Posted 2013) [#1]
I´m trying the feature FIleTime in LibCurl but got no results.
The document says:
If you get -1, it can be because of many reasons (unknown, the server hides it or the server doesn't support the command that tells document time etc) and the time of the document is unknown. Note that you must tell the server to collect this information before the transfer is made, by using the CURLOPT_FILETIME option to setOptInt or you will unconditionally get a -1 back.

I´ve set the option with:
webdings.setOptInt(CURLOPT_FILETIME,1)

but I got a zero with:
Local info:TCurlInfo= webdings.getinfo()
SetGadgetText(DateiZeit,info.FileTime())

So either the server given´t these info or I´m wrong.
The other thing is, FileTime is a Keywoard from BMax too, is that a problem?
What I need is the timestamp to decide if the file I want to download is either new or not.
I have a parser function , they give me the file date and time from the header, I can calculate a unix timestamp from that ( I´m currently working on that) and do my stuff, but these FileTime feature, I´m in love with that. Does this love has a future?


Grisu(Posted 2013) [#2]
I don't think that feature is supported by all servers anyway.

I use a workaround in my download function:
1. First I create a simple indexfile with all files that will be on the server (name, date, time, size; as needed). Then I upload / replace the server files.
2. The client app downloads the indexfile and checks which files need to be updated on the HDD.
3. And downloads only the new / changed files accordingly.