@Override protected void processOptions(LinkedList<String> args) throws IOException { CommandFormat cf = new CommandFormat(2, Integer.MAX_VALUE, "R", null); cf.parse(args); setRecursive(cf.getOpt("R")); String modeStr = args.removeFirst(); try { pp = new ChmodParser(modeStr); } catch (IllegalArgumentException iea) { // TODO: remove "chmod : " so it's not doubled up in output, but it's // here for backwards compatibility... throw new IllegalArgumentException( "chmod : mode '" + modeStr + "' does not match the expected pattern."); } }
ChmodHandler(String modeStr) throws IOException { super("chmod"); try { pp = new ChmodParser(modeStr); } catch(IllegalArgumentException iea) { patternError(iea.getMessage()); } }
ChmodHandler(FileSystem fs, String modeStr) throws IOException { super("chmod", fs); try { pp = new ChmodParser(modeStr); } catch(IllegalArgumentException iea) { patternError(iea.getMessage()); } }