public void execute(Environment env, CommandLine cmd, ConsoleReader reader) { FileSystem hdfs = (FileSystem) env.getValue(Constants.HDFS); String wd = hdfs.getWorkingDirectory().toString(); if (cmd.hasOption("l")) { log(cmd, wd); } else { log(cmd, wd.substring(env.getProperty(Constants.HDFS_URL).length())); } FSUtil.prompt(env); }
public PolopolyFS(List<Item> items) { String pp = FSUtil.getPolopoly(); if (pp == null) { return; } for (Item item : items) { File path = new File(pp + "/" + item.value); String targetImplicitDir = item.path; if ("dir".equals(item.type)) { systems.add(new DirFS(path, targetImplicitDir)); } else if ("less".equals(item.type)) { systems.add(new LessFS(path, targetImplicitDir)); } else if ("js".equals(item.type)) { systems.add(new JSFS(path, targetImplicitDir)); } else { LoggerFactory.getInstance() .echo("pp-rebel unknown configuration type '" + item.type + "' is ignored"); } } }