开发者

C# equivalent of Java's mkdirs()

I am tryin开发者_如何转开发g to convert a Java program to c#.

Is there a equivalent to Java's mkdirs() command which recursively makes folders?


Simply:

Directory.CreateDirectory(pathToDir)

This will create any and all directories specified in the given path. (Just like mkdirs)

See the documentation here:

http://msdn.microsoft.com/en-us/library/54a0at6s.aspx


Directory.CreateDirectory

Any and all directories specified in path are created, unless they already exist or unless some part of path is invalid

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜