Tag: system.io

Articles and experiments related to system.io.

Google Search: Directory explorer c#

Someone searched for "directory explorer c#" and landed on my site, likely not finding what they needed. This post clarifies how to use C# for directory exploration. It covers using .NET's System.IO namespace, specifically the File and Directory classes, for tasks like checking file existence (File.Exists) and getting a list of subdirectories (Directory.GetDirectories). This information will hopefully be helpful to future visitors with similar searches.

Read article

Google Search Query: how to know if a certain file is a folder in c#

This post answers the question of how to determine if a given file path in C# is a directory. It explains how to use the File.GetAttributes() method and the FileAttributes.Directory property to check for the directory attribute. The post provides a boolean expression ((File.GetAttributes(path) & FileAttributes.Directory) == FileAttributes.Directory) to effectively perform this check.

Read article

Stay in the loop.

I'm trialing a newsletter. Join for monthly insights into web dev, Chrome, and the open web.

alternate_email

Get in touch

Open to chat about Chrome or Web development.

Book a consultation