if (res.exists()) {
return (!res.isCollection());
} else {
try {
HttpURL parentURL = new HttpURL(httpURL.toString());
String user = httpURL.getUser();
String pass = httpURL.getPassword();
if (user != null)
parentURL.setUserinfo(user, pass);
String currentHierPath = httpURL.getCurrentHierPath();
if (!currentHierPath.endsWith("/"))
currentHierPath = currentHierPath + "/";
parentURL.setPath(currentHierPath);
WebdavResource parentRes = new WebdavResource(parentURL);
if (!parentRes.isCollection())
return false;
return true;
} catch (Exception e) {