Creating a new directory and new file
See also CreateDirectoryTreeInJava
To create a new file, you need to use the MKCOL to create a new collection.
This will create a new directory called testDir in the files collection. Make sure you include the full path right from the context.
Putting a new file in this directory just requires a PUT. The following putMethod will put a file called newFile.txt in the testDir directory, with content "test data".
boolean success=res.putMethod("/slide/files/testDir/newFile.txt","test data");
To check whether the contents of the file were really stored, you can retrieve it using:
Getting the file to your local filesystem can be achieved with the following code:
boolean success=resource.getMethod("/slide/files/testDir/newFile.txt", new java.io.File("C:\\luanne\\newFile.txt"));
Is there a "Getting Started with the Slide API" guide anywhere? Or a "HelloSlide.java" file that somebody can put up here? I'm looking for some guidance on how to use the Slide API without using WebDAV. Help of any kind is appreciated - URLs, source files, etc. -- JohnMcDonnell