*/
public List list(String parent) throws IOException {
Message.debug("SShRepository:list called: " + parent);
ArrayList result = new ArrayList();
Session session = null;
ChannelExec channel = null;
session = getSession(parent);
channel = getExecChannel(session);
URI parentUri = null;
try {
parentUri = new URI(parent);
} catch (URISyntaxException e) {
IOException ioe = new IOException("The uri '" + parent + "' is not valid!");
ioe.initCause(e);
throw ioe;
}
String fullCmd = replaceArgument(listCommand, parentUri.getPath());
channel.setCommand(fullCmd);
StringBuffer stdOut = new StringBuffer();
StringBuffer stdErr = new StringBuffer();
readSessionOutput(channel, stdOut, stdErr);
if (channel.getExitStatus() != 0) {
Message.error("Ssh ListCommand exited with status != 0");
Message.error(stdErr.toString());
return null;
} else {
BufferedReader br = new BufferedReader(new StringReader(stdOut.toString()));