foreach (string dir in Directory.GetDirectories(@"c:\"))
{
DirectoryInfo di = new DirectoryInfo(dir);
if ((di.Attributes & FileAttributes.System) == 0)
dirList.Add(dir);
}
DirectoryInfo.Attributes is a Flag enum list so you can't just check for equality. Using the above code makes it more or less safe :-)
The life of a computer/sci-fy/teccie-nerd :-) Interested in lots of stuff like: Net, C#, Software Architecture, IoT, building stuff (like sensors based on RPI Pico W), Cars, Books, meeting people, learning new stuff, Cyber Security
Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts
Sunday, May 13, 2007
Subscribe to:
Posts (Atom)
Lazzes Smart Home - 2023
Here is an overview of the components in the Smart Home as of now. More stuff than I tought :-)
-
If you, like me - use VLC mediaplayer to view all your media, you may have run into the same problem as I. That is, when we watch multiple m...
-
Vista throttles networkspeed to keep multimedia viewing glitch free - but they have missed that we'rent using 286's no more... To di...
-
using System ; using System . Data ; using System . Configuration ; using System . Web ; using System . Web . Security ; using System ...