Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Why some directories are not listed by Directory.GetDirectories() API?

$
0
0

There are 7 PS modules installed. But the following small console application can only print out 4 of them.

There is "msonline" module under it but it never get printed.

class Program
    {
        static void Main(string[] args)
        {
            string psmoduleDir = Path.Combine(Environment.SystemDirectory, @"WindowsPowerShell\v1.0\Modules");

            string[] modules = Directory.GetDirectories(psmoduleDir);

            foreach (string module in modules)
            {
                Console.WriteLine(module);
            }

        }
    }


Viewing all articles
Browse latest Browse all 8156

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>