Reputation: 1850
Does anyone know what's the .NET/C# equivalent of Delphi's forceDirectory function ? For who don't know delphi, forceDirectory creates all the directories in a given path if it doesn't exist.
Upvotes: 16
Views: 4682
Reputation: 88475
The method Directory.CreateDirectory(path)
automatically creates all the directories/subdirectories specified in the path. From the Remarks:
Any and all directories specified in path are created
Upvotes: 30