コード例 #1
0
        static void Main()
        {
            var directoryProvider = new DirectoryProvider();
            var traverser = new DirectoryTraverser(@"C:\", directoryProvider);

            var children = traverser.GetChildDirectories();
            foreach (var child in children)
            {
                Console.WriteLine(child);
            }

            Console.WriteLine(traverser.CurrentDirectory);
        }
コード例 #2
0
        static void Main()
        {
            var directoryProvider = new DirectoryProvider();
            var traverser         = new DirectoryTraverser(@"C:\", directoryProvider);

            var children = traverser.GetChildDirectories();

            foreach (var child in children)
            {
                Console.WriteLine(child);
            }

            Console.WriteLine(traverser.CurrentDirectory);
        }