I would recommend not to use exists() at all. Whenever I want to check the existence of a resource I simply use the HEAD method.
For the given example: if (webdavResource.headMethod("/rootpath/files/test.txt") { // test.txt exists } Regards, Ingo > All, > > Does anyone know how to use exists() method in org.apache.webdav.lib.WebdavResource? > > > In WebdavResource.java's comments, I find that exists() is similar to the exists() > in java.io.File, so I think if i want to check if one file(such as files/test.txt) > exists, i can do as following: > > 1. create a instance of WebdavResource; > 2. call setPath(/rootpath/files/test.txt); (rootPath is the slide's root path) > 3. call exists() to check if the files exists. > > but if the file doesn't exists, HttpException will be thrown when calling setPath(), > so I have no change to call exists(). > > Is my usage of exists() right? If not, how should i use it? > > Thanks in advance. > > regards > Yong --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]