Exemple #1
0
        public void ShowInsertDirToConsole()           //метод для вывода списков вложенных папок в консоль
        {
            Console.WriteLine("Directory " + path + " includes:");
            if (list.Length == 0)
            {
                Console.WriteLine("It's empty");                                  //подпись для пустых папок
            }
            foreach (string element in list)
            {
                Console.WriteLine(element);
            }
            Console.WriteLine();

            for (int i = 0; i < list.Length; i++)
            {
                if (Directory.Exists(path + list[i]))
                {
                    ReturnFullArrayList returnFull = new ReturnFullArrayList(path + list[i] + "/");
                    if (returnFull.ReturnList().Length >= 0)
                    {
                        ShowResultConsole showResult = new ShowResultConsole(returnFull.ReturnList(), path + list[i] + "/");
                        showResult.ShowInsertDirToConsole();
                    }
                }
            }
        }
Exemple #2
0
        static void Main()
        {
            string newPath = EnterThePath();
            ReturnFullArrayList returnFull = new ReturnFullArrayList(newPath);
            ShowResultConsole   showResult = new ShowResultConsole(returnFull.ReturnList(), newPath);

            showResult.ShowInsertDirToConsole();
        }