|
@@ -1,19 +1,18 @@
|
|
/**
|
|
/**
|
|
- * Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
- * or more contributor license agreements. See the NOTICE file
|
|
|
|
- * distributed with this work for additional information
|
|
|
|
- * regarding copyright ownership. The ASF licenses this file
|
|
|
|
- * to you under the Apache License, Version 2.0 (the
|
|
|
|
- * "License"); you may not use this file except in compliance
|
|
|
|
- * with the License. You may obtain a copy of the License at
|
|
|
|
|
|
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
+ * contributor license agreements. See the NOTICE file distributed with this
|
|
|
|
+ * work for additional information regarding copyright ownership. The ASF
|
|
|
|
+ * licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
+ * "License"); you may not use this file except in compliance with the License.
|
|
|
|
+ * You may obtain a copy of the License at
|
|
*
|
|
*
|
|
- * http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
+ * http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
- * distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
- * See the License for the specific language governing permissions and
|
|
|
|
- * limitations under the License.
|
|
|
|
|
|
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
+ * License for the specific language governing permissions and limitations under
|
|
|
|
+ * the License.
|
|
*/
|
|
*/
|
|
package org.apache.zookeeper.cli;
|
|
package org.apache.zookeeper.cli;
|
|
|
|
|
|
@@ -28,7 +27,6 @@ import org.apache.zookeeper.data.Stat;
|
|
public class Ls2Command extends CliCommand {
|
|
public class Ls2Command extends CliCommand {
|
|
|
|
|
|
private static Options options = new Options();
|
|
private static Options options = new Options();
|
|
-
|
|
|
|
private String args[];
|
|
private String args[];
|
|
|
|
|
|
public Ls2Command() {
|
|
public Ls2Command() {
|
|
@@ -40,17 +38,17 @@ public class Ls2Command extends CliCommand {
|
|
Parser parser = new PosixParser();
|
|
Parser parser = new PosixParser();
|
|
CommandLine cl = parser.parse(options, cmdArgs);
|
|
CommandLine cl = parser.parse(options, cmdArgs);
|
|
args = cl.getArgs();
|
|
args = cl.getArgs();
|
|
- if(args.length < 2) {
|
|
|
|
|
|
+ if (args.length < 2) {
|
|
throw new ParseException(getUsageStr());
|
|
throw new ParseException(getUsageStr());
|
|
}
|
|
}
|
|
|
|
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public boolean exec() throws KeeperException, InterruptedException {
|
|
public boolean exec() throws KeeperException, InterruptedException {
|
|
|
|
+ err.println("'ls2' has been deprecated. "
|
|
|
|
+ + "Please use 'ls [-s] path' instead.");
|
|
String path = args[1];
|
|
String path = args[1];
|
|
boolean watch = args.length > 2;
|
|
boolean watch = args.length > 2;
|
|
Stat stat = new Stat();
|
|
Stat stat = new Stat();
|