[REBOL] Re: read-thru check refinement
From: arolls:bigpond:au at: 22-Jul-2001 19:51
Refer to the source to exists-thru?,
which is used by read-thru.
> Still, it doesn't explain why we have to supply the date and time
> since they must be with the already downloaded file, right?
Not necessarily. You could be supplying a minimum
date for many files, for instance.
> what's the point of supplying a logic or none?
Well, if the 'info argument supplied to exists-thru?
is a logic! (not a block!), then true is always returned.
This means that read-thru tries to update the file from
the net.
So I don't really see the point either.
There could be a function out there that sometimes
supplies exists-thru? with a logic!
Which gives me an idea.
> > The block is the standard info block for a file item in an index
> > file:
>
> > [971 23-Sep-2000/16:51:34-7:00]
>
> > It contains the size in bytes and the time-stamp. Read-thru/check
> > will not download a file if it is already in the cache and the date
> > and time-stamp match those on the remote file.
Actually, exists-thru? returns true if the
net-file is newer than the cache-file by 3
seconds or more.