示例#1
0
 private void PrintExemptPaths(Node.Folder.Root root)
 {
     foreach (var path in root.exemptPaths)
     {
         result += " " + path.fullPath + "\n";
     }
 }
示例#2
0
        public NodePrinter(Node.Folder.Root root, Options o)
        {
            _options = o;
            _color   = new Coloration(o.useColoration);

            AddSeparators(o);

            PrintExemptPaths(root);

            if (o.useInvisibleTree)
            {
                CreateInvisibleTree(root.value);
            }
            else
            {
                CreateNodeRoot(root.value);
            }

            AddSeparators(o);
        }
示例#3
0
        static void Main(string[] args)
        {
            try {
                var options = CommandLineParser.GetOptions(args);

                List <Path> paths = new List <Path>();

                string s;
                while ((s = Console.ReadLine()) != null)
                {
                    if (s.Trim() == "")
                    {
                        break;
                    }

                    paths.Add(new Path(s, options));
                }

                var root   = new Node.Folder.Root(paths);
                var result = new NodePrinter(root, options);
                Console.WriteLine(result);
            }
            catch (CommandLineException ex) {
                Console.WriteLine();
                Console.WriteLine("Command argument error: " + ex.Message);
                Console.WriteLine();
                Console.WriteLine(CommandLineParser.HelpSwitches());
            }
            catch (HelpRequested) {
                Console.WriteLine();
                Console.WriteLine(CommandLineParser.HelpHeader());
                Console.WriteLine(CommandLineParser.HelpSwitches());
            }
            catch (InputException ex) {
                Console.WriteLine();
                Console.WriteLine("Input error: " + ex.Message);
            }
        }