Using Directory.Delete("C:", true)
deletes the partition? Or is it just blocked and does not execute?
Using Directory.Delete("C:", true)
deletes the partition? Or is it just blocked and does not execute?
Directory.Delete()
is done to delete files and folders . It can not delete a partition that is on a lower layer than it is using.
It will attempt to delete all folders on this partition. But it will depend on permissions. If you are running the application with administrator privilege it will cause a pretty mess. Even so, it will not erase everything. Other issues may prevent deletion, as documented in the documentation.
Any attempt will depend on permission.
There is no special treatment for any situation.
If you want to understand the details, you can track your source code . At some point it delegates to the operating system.