Re: WebdavResouce, putMethod(), and existence

2004-12-17 Thread Garret Wilson
Carlos, Carlos Villegas wrote: For intended usage patterns check the slide command line sample client. Other ways of using WebdavResource outside of what the command line client does, were probably not thought of carefully or haven't been tested. (sigh) Thanks for verifying my fears. It's a

Re: WebdavResouce, putMethod(), and existence

2004-12-17 Thread Garret Wilson
Garret Wilson wrote: Because I can't depend on WebdavResource.exists(), I have to call WebdavResource.headMethod(). The API says that this returns a boolean to indicate whether the method succeeded, but what *really* happens is that it either succeeds or throws an exception if the file doesn't

Re: WebdavResouce, putMethod(), and existence

2004-12-16 Thread Garret Wilson
James, James Mason wrote: After you construct your WebdavResource you should be able to call headMethod() to see if the remote resource exists. I don't know if this is the best method, but it should work. There are a 100 ways that would work, I'm sure---but how was WebdavResource *designed* to be

Re: WebdavResouce, putMethod(), and existence

2004-12-16 Thread Carlos Villegas
I suspect WebdavResource was designed to be used the way it is used in the slide command line client and that's it. Some functions like exists() may have been added just for completeness trying to parallel the File API but as you point out, it makes no sense to have a exists() function if you

Re: WebdavResouce, putMethod(), and existence

2004-12-13 Thread James Mason
Garret, After you construct your WebdavResource you should be able to call headMethod() to see if the remote resource exists. I don't know if this is the best method, but it should work. -James On Sun, 2004-12-12 at 17:13 -0800, Garret Wilson wrote: I started using Slide just days ago, and

WebdavResouce, putMethod(), and existence

2004-12-12 Thread Garret Wilson
I started using Slide just days ago, and immediately ran into the WebdavResource weirdness for non-existent files: constructing a WebdavResource for a file that doesn't exist throws an HttpException with status code 404. After searching the archives, I found a workaround of new