I’m stuck on Stage #mg5.
I’ve tried ..Searching everywhere, but can’t find a command that checks if a file is has executable permissions
And here’s a snippet of my code:
string PATH = Environment.GetEnvironmentVariable("PATH");
IEnumerable<string> folders = PATH.Split(Path.PathSeparator);
foreach (string folderPath in folders)
{
DirectoryInfo directory = new DirectoryInfo(folderPath);
try
{
var files = directory.GetFiles("");
foreach (var file in files)
{
// How to check if a file is executable?
}
}
catch (DirectoryNotFoundException ex)
{
// Do nothing
}