Deleting directory and subdirectories safely in C#
Most C# developers know of Directory.Delete(path, recursive). However every once in a while they’ll discover that it’s error prone.
Here’s how to delete directories with read-only files inside them.