WebdavResource wdr = connect(directory);
if(wdr == null)
throw new Exception ("could not connect to WebDav Server");
WebdavResources e = wdr.getChildResources();
java.util.Enumeration en = e.getResources();
while(en.hasMoreElements()) {
WebdavResource cr = (WebdavResource)en.nextElement();
System.out.println(cr);
if(cr.isCollection())
listnames.put(cr, "dir");
else
listnames.put(cr, "file");
}
if(logtext != null) logtext.append("..webdav server reply [changeDirectory] [status= " + wdr.getStatusMessage() );
} catch (Exception e) {
MainWindow.message("could not change Directory [" + directory + "] cause:" + e.getMessage(), SWT.ICON_WARNING);
try {
new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() + " ; could not change Directory [" + directory + "]", e);
} catch(Exception ee) {
//tu nichts
}
hasError = true;
if(logtext != null) logtext.append("could not change Directory [" + directory + "] cause:" + e.getMessage() );
}
return listnames;
}