protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(1, int.MaxValue, "p"); cf.Parse(args); createParents = cf.GetOpt("p"); }
// milliseconds /// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(1, 1, "f"); cf.Parse(args); follow = cf.GetOpt("f"); }
protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(1, 1, "e", "d", "f", "s", "z"); cf.Parse(args); string[] opts = Collections.ToArray(cf.GetOpts(), new string[0]); switch (opts.Length) { case 0: { throw new ArgumentException("No test flag given"); } case 1: { flag = opts[0][0]; break; } default: { throw new ArgumentException("Only one test flag is allowed"); } } }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(2, int.MaxValue); cf.Parse(args); GetRemoteDestination(args); }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(1, int.MaxValue, "-ignore-fail-on-non-empty" ); cf.Parse(args); ignoreNonEmpty = cf.GetOpt("-ignore-fail-on-non-empty"); }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(1, int.MaxValue, "f", "r", "R", "skipTrash"); cf.Parse(args); ignoreFNF = cf.GetOpt("f"); deleteDirs = cf.GetOpt("r") || cf.GetOpt("R"); skipTrash = cf.GetOpt("skipTrash"); }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(0, int.MaxValue, "h"); cf.Parse(args); humanReadable = cf.GetOpt("h"); if (args.IsEmpty()) { args.AddItem(Path.Separator); } }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(1, int.MaxValue, "crc", "ignoreCrc", "p"); cf.Parse(args); SetWriteChecksum(cf.GetOpt("crc")); SetVerifyChecksum(!cf.GetOpt("ignoreCrc")); SetPreserve(cf.GetOpt("p")); SetRecursive(true); GetLocalDestination(args); }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { PopPreserveOption(args); CommandFormat cf = new CommandFormat(2, int.MaxValue, "f"); cf.Parse(args); SetOverwrite(cf.GetOpt("f")); // should have a -r option SetRecursive(true); GetRemoteDestination(args); }
// default format string /// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(1, int.MaxValue, "R"); cf.Parse(args); SetRecursive(cf.GetOpt("R")); if (args.GetFirst().Contains("%")) { format = args.RemoveFirst(); } cf.Parse(args); }
protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(1, int.MaxValue, OptionQuota, OptionHuman); cf.Parse(args); if (args.IsEmpty()) { // default path is the current working directory args.AddItem("."); } showQuotas = cf.GetOpt(OptionQuota); humanReadable = cf.GetOpt(OptionHuman); }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(0, int.MaxValue, "d", "h", "R"); cf.Parse(args); dirRecurse = !cf.GetOpt("d"); SetRecursive(cf.GetOpt("R") && dirRecurse); humanReadable = cf.GetOpt("h"); if (args.IsEmpty()) { args.AddItem(Path.CurDir); } }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(0, int.MaxValue, "R"); cf.Parse(args); SetRecursive(cf.GetOpt("R")); if (args.IsEmpty()) { throw new HadoopIllegalArgumentException("<path> is missing"); } if (args.Count > 1) { throw new HadoopIllegalArgumentException("Too many arguments"); } }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { try { CommandFormat cf = new CommandFormat(2, int.MaxValue, "nl"); cf.Parse(args); delimiter = cf.GetOpt("nl") ? "\n" : null; dst = new PathData(new URI(args.RemoveLast()), GetConf()); if (dst.exists && dst.stat.IsDirectory()) { throw new PathIsDirectoryException(dst.ToString()); } srcs = new List <PathData>(); } catch (URISyntaxException e) { throw new IOException("unexpected URISyntaxException", e); } }
/// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(2, int.MaxValue, "R", "w"); cf.Parse(args); waitOpt = cf.GetOpt("w"); SetRecursive(true); try { newRep = short.ParseShort(args.RemoveFirst()); } catch (FormatException nfe) { DisplayWarning("Illegal replication, a positive integer expected"); throw; } if (newRep < 1) { throw new ArgumentException("replication must be >= 1"); } }
// TODO: should probably allow path arguments for the filesystems /// <exception cref="System.IO.IOException"/> protected internal override void ProcessOptions(List <string> args) { CommandFormat cf = new CommandFormat(0, 0); cf.Parse(args); }