Christian Mayer writes:
>
> "Curtis L. Olson" wrote:
> > 
> > Christian Mayer writes:
> > > > Except, as Curt has already pointed out, rsync is more than just a
> > > > file transfer protocol ... its functionality would need to be duplicated
> > > > in FG/SG/plib before http could be used.
> > >
> > > The missing functionality is the ability to figure out if the tile has
> > > changed IIRC.
> > >
> > > But that'n no problem - HTTP already supports that. IIRC it send's a
> > > status code of 302 if the reqested data didn't change...
> >  
> > We could continue to work on an entire directory level to avoid this
> > problem, but the client side is still going to have to do all the work
> > of rsync.
> 
> We can do it directory wise. 

we don't need rsync all we need is SMART ftp in a thread

i.e in Python

    def download_if_newer(self, source, target, mode=''):
        """
        Download a file only if it's newer than the target on the
        local host or if the target file does not exist.
        """
        source_timestamp = self.path.getmtime(source)
        if os.path.exists(target):
            target_timestamp = os.path.getmtime(target)
        else:
            # every timestamp is newer than this one
            target_timestamp = 0.0
        if source_timestamp > target_timestamp:
            self.download(source, target, mode)

FWIW 
I have started prototyping a Python version using these
http://c0re.jp/c0de/ftpparsemodule/
http://www.ndh.net/home/sschwarzer/python/ftputil.html

eventually I think a combination of 
http://cr.yp.to/ftpparse.html
and PLIBs net library will be all we need to build this

however in the long run I would like to see an xml-rpc 
implemetation as this would be much more flexible

Cheers

Norman


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to