Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET equivalent of Delphi's forceDirectory

Tags:

c#

.net

delphi

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.

like image 858
no_one Avatar asked Jun 05 '09 07:06

no_one


1 Answers

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

like image 168
Andy White Avatar answered Oct 19 '22 08:10

Andy White