@Override protected void processOptions(LinkedList<String> args) throws IOException { args.addFirst("-s"); super.processOptions(args); }
@Override protected void processPathArgument(PathData item) throws IOException { // go one level deep on dirs from cmdline unless in summary mode if (!summary && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } }
@Override protected void processOptions(LinkedList<String> args) throws IOException { CommandFormat cf = new CommandFormat(0, Integer.MAX_VALUE, "h", "s", "v", "x"); cf.parse(args); setHumanReadable(cf.getOpt("h")); summary = cf.getOpt("s"); showHeaderLine = cf.getOpt("v"); excludeSnapshots = cf.getOpt("x"); if (args.isEmpty()) args.add(Path.CUR_DIR); }
@Override protected void processPath(PathData item) throws IOException { long length; if (item.stat.isDirectory()) { length = item.fs.getContentSummary(item.path).getLength(); } else { length = item.stat.getLen(); } usagesTable.addRow(formatSize(length), item); } }
@Override protected void processPathArgument(PathData item) throws IOException { usagesTable = new TableBuilder(2); // go one level deep on dirs from cmdline unless in summary mode if (!summary && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } usagesTable.printToStream(out); }
@Override protected void processOptions(LinkedList<String> args) throws IOException { args.addFirst("-s"); super.processOptions(args); }
@Override protected void processPathArgument(PathData item) throws IOException { usagesTable = new TableBuilder(2); // go one level deep on dirs from cmdline unless in summary mode if (!summary && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } usagesTable.printToStream(out); }
@Override protected void processPathArgument(PathData item) throws IOException { usagesTable = new TableBuilder(2); // go one level deep on dirs from cmdline unless in summary mode if (!summary && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } usagesTable.printToStream(out); }
@Override protected void processOptions(LinkedList<String> args) throws IOException { args.addFirst("-s"); super.processOptions(args); }
@Override protected void processOptions(LinkedList<String> args) throws IOException { args.addFirst("-s"); super.processOptions(args); }
@Override protected void processPathArgument(PathData item) throws IOException { usagesTable = new TableBuilder(2); // go one level deep on dirs from cmdline unless in summary mode if (!summary && item.stat.isDirectory()) { recursePath(item); } else { super.processPathArgument(item); } usagesTable.printToStream(out); }
@Override protected void processPath(PathData item) throws IOException { ContentSummary contentSummary = item.fs.getContentSummary(item.path); long length = contentSummary.getLength(); // if (excludeSnapshots) { // length -= contentSummary.getSnapshotLength(); // } usagesTable.addRow(formatSize(length), item); } }
@Override protected void processPath(PathData item) throws IOException { long length; if (item.stat.isDirectory()) { length = item.fs.getContentSummary(item.path).getLength(); } else { length = item.stat.getLen(); } usagesTable.addRow(formatSize(length), item); } }
@Override protected void processPath(PathData item) throws IOException { long length; if (item.stat.isDirectory()) { length = item.fs.getContentSummary(item.path).getLength(); } else { length = item.stat.getLen(); } usagesTable.addRow(formatSize(length), item); } }
@Override protected void processOptions(LinkedList<String> args) throws IOException { args.addFirst("-s"); super.processOptions(args); }
@Override protected void processArguments(LinkedList<PathData> args) throws IOException { if (showHeaderLine) { setUsagesTable(new TableBuilder("SIZE", "DISK_SPACE_CONSUMED_WITH_ALL_REPLICAS", "FULL_PATH_NAME")); } else { setUsagesTable(new TableBuilder(3)); } super.processArguments(args); if (!getUsagesTable().isEmpty()) { getUsagesTable().printToStream(out); } }
@Override protected void processPath(PathData item) throws IOException { ContentSummary contentSummary = item.fs.getContentSummary(item.path); long length = contentSummary.getLength(); long spaceConsumed = contentSummary.getSpaceConsumed(); if (excludeSnapshots) { length -= contentSummary.getSnapshotLength(); spaceConsumed -= contentSummary.getSnapshotSpaceConsumed(); } getUsagesTable().addRow(formatSize(length), formatSize(spaceConsumed), item); } }