public void process(String exename, String[] params) throws Exception {
log.debug("entered");
if (helpRequested()) {
PrintWriter out = new PrintWriter(new BufferWriter(getStdOut()));
out.print(" Usage: lslns [--help] [-out=string|filename|fileinfo] TARGET\n");
out.print(" --help : this help\n");
out.close();
log.debug("done");
return;
}
BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
VFS vfs = shell.getVFS();
FileName pwd = new FileName(shell.getEnvProperty("PWD"));
String out = OUTPUT_STRING;
FileName target = null;
Collection result = new HashSet();
if (params.length <= 2) {
for (int i = 0; i < params.length; i++) {
String param = params[i];
if (param.startsWith(OUTPUT))
out = param.substring(OUTPUT.length());
else {
FileName path = new FileName(param);
if (path.isRelative())
path = pwd.absolutize(path);
target = path;
}
}
}
if ((params.length >= 3) || (target == null)) {
if (canThrowEx()) {
throw new RuntimeException("Usage: lslns [-out=string|filename|fileinfo] TARGET");
} else {
PrintWriter pw = new PrintWriter(new BufferWriter(getStdOut()));
pw.println("Usage: lslns [-out=string|filename|fileinfo] TARGET");
}
} else {
Collection links = vfs.getLinks(shell.getUserCtx(), target, true);
Iterator it = links.iterator();