Create Missing Folder along the path
- by Ilya Biryukov
I have a path for example
C:\files\dir\file.css
The "files" directory exists. however, the dir directory is missing and needs to be created.
When I try to create the file using File.Create, it throws an exception saying that the directory was not found.
Is there any way to make .net to create the missing folders along the path for me?
Thanks