}
public WOResponse getPathAction() {
WORequest aRequest = request();
ERXResponse aResponse = new ERXResponse();
if (aRequest.isUsingWebServer()) {
aResponse.setStatus(WOMessage.HTTP_STATUS_FORBIDDEN);
aResponse.appendContentString("Access Denied");
return aResponse;
}
String aPath = aRequest.headerForKey("filepath");
boolean showFiles = (aRequest.headerForKey("showFiles") != null) ? true : false;
// looking for roots, or root listing of only 1 root
if (aPath == null && !singleRoot) {
aResponse.appendContentString(xmlRoots);
aResponse.setHeader("YES", "isRoots");
} else {
if (aPath == null) aPath = rootStrings[0];
NSArray anArray = fileListForStartingPath(aPath, showFiles);
if (anArray == null) {
aResponse.appendContentString("ERROR");
} else {
_JavaMonitorCoder aCoder = new _JavaMonitorCoder();
String anXMLString = null;
anXMLString = aCoder.encodeRootObjectForKey(anArray, "pathArray");
anXMLString = (anXMLString) + " \r\n";
aResponse.appendContentString(anXMLString);
aResponse.setHeader(aPath, "filepath");
}
}
return aResponse;
}