Update:
For adding properties, using this code:
=====
boolean prop = wdr.proppatchMethod("/slide/files/test3.tif",new PropertyName("DAV:",
"mykey"),"myvalue",true);
=====
Still looking for assistance on how to get all files that have property 'mykey' =
'myvalue'.
-D
> -----Original Message-----
> From: Darren Hartford
> Sent: Friday, October 01, 2004 2:44 PM
> To: Slide Users Mailing List
> Subject: [newbie] properties to files
>
>
> Hey all,
> Going through the learning curve on Slide and on the WebDAV
> client api/library.
>
> I can successfully 'put' and 'get' binary files.
>
> However, I'm having a hard time understanding how to add
> properties to files for use in searching (and I'll ask now,
> how to search on a property).
>
> I'm guessing it is something with the 'proppatchmethod'
> method(s), but can't find any good examples on how to use
> these methods (and, in the same token, the propfindmethods).
>
> Any examples please?
>
>
> my code to-date:
> ===========
> WebdavResource wdr = null;
> HttpURL hrl =
> new
> HttpURL("http://localhost:8080/slide/files");
> hrl.setUserinfo("root","root");
> wdr = new WebdavResource(hrl);
>
> if(wdr==null) {
> System.out.println("WDR creation failed");
> }
>
> //use root-based dir structure. Windows
> drive names cause issues (assume with colons)
> String filename = "/test3.tif";
> File fn = new File(filename);
> System.out.println("can read file? " +
> fn.canRead());
> boolean writebol = wdr.putMethod(fn);
>
> //directory-type listing
> String arr[] = wdr.list();
> int i=arr.length;
> while( --i >= 0 ) {
> System.out.println( "["+i+"] "+arr[ i ] );
> }
> ===========
>
> -D
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]