When an instance of WebdavResource does not exist (the "exists" field is false), all of the other properties of the resource are undefined. Within the Javadoc comment for the WebdavResource class a direct correlation is made between java.io.File.isDirectory() and org.apache.webdav.lib.WebdavResource.isCollection(). The File isDirectory() method, however, returns true only if the file exists and is a directory. WebdavResource simply returns a value based upon the last known setting for the resourceType field, meaning that if "exists" is false that this value is undefined.
I propose that the live properties take the value of the "exists" field into account, and return a known value when the resource does not exist. Looking to java.io.FIle as an example, this would mean: 1) isResourceType() would return null for non-existent resources. This would also fix isCollection(), making it match with the File isDirectory() definition. 2) getGetContentLength() would return 0L for non-existent resources. 3) getDisplayName() would return the unencoded name take from the httpURL field. -Steve --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
