Network save and load

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Network save and load

Sven Van Caekenberghe
Hilaire,

On 11 Dec 2011, at 13:57, Sven Van Caekenberghe wrote:

> WebDAV is a quite complicated standard, multiple RFCs, using lots of XML, so it will be difficult to implement all of it.
>
> Since I like the DrGeo project and its goals, I will try to help.
>
> Give me some time, and I will see what I can come up with.

OK, here is an early, simplified, totally incomplete, proof of concept:

        http://www.squeaksource.com/ZincHTTPComponents/Zinc-WebDAV

You'll need to load XML Support and the very latest Zn version.

I tested on Mac OS X against a free application called 'MediaMaster Server' ( http://itunes.apple.com/us/app/mediamaster-server/id427559105?mt=12 ), which gives you a very simple GUI to quickly set up a Web DAV server. I don't know if you are on Mac.

ZnWebDAVClient new
        host: 'localhost';
        port: 8000;
        username: 'johndoe' password: 'secret';
        list;
        at: 'foo.txt' put: (ZnEntity text: 'Pharo Smalltalk');
        at: 'foo.txt'.

Right now, you can list the (top-level) files, load a file and save a file. This server returns all files as bytes, I don't know if that is normal.

There are so many limitations that I can't list them all ;-) Have a look at the code, this is just the beginning.

Most probably this won't work for your server: if possible, give me a login so that I can see what goes wrong.

Regards,

Sven








12