no_one
no_one

Reputation: 1850

.NET equivalent of Delphi's forceDirectory

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

Answers (1)

Andy White
Andy White

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

Related Questions