Hi,

Using the slide Java client I'm trying to create a new file which I want to
create in a directory that doesn't yet exist.

I've tried several things, but can't get any to work.

Say for example I want to create a new file at the URL:

http://localhost:8080/slide/files/data/bob/newfile

and the directory 'bob' does not yet exist, how would I go about doing this?

here is an example of code I have tried:


HttpURL httpURL = new HttpURL("http://localhost:8080/slide/files/data/bob/newfile";);

wdr = new WebdavResource(httpURL, credentials, WebdavResource.NOACTION,
DepthSupport.DEPTH_0);
            
if (wdr.putMethod(bytes))
{
    System.out.println("YES!!");
}
else
{
    System.out.println("NO!!");
}


I have also tried:

HttpURL httpURL = new HttpURL("http://localhost:8080/slide/files/data/";);

wdr = new WebdavResource(httpURL, credentials, WebdavResource.NOACTION,
DepthSupport.DEPTH_0);
            
if (wdr.putMethod("bob/newfile", bytes))
{
    System.out.println("YES!!");
}
else
{
    System.out.println("NO!!");
}


Which also didn't work (and the directory 'data' does exist).


Any pointers, I'm kind of lost here?


Also, out of interest (and it may be related), how would I create a new empty
directory?


Cheers

Luke.
-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to