Directory.CreateDirectory Method
Creates all directories and subdirectories as specified by path.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Syntax
public static DirectoryInfo CreateDirectory (
stringpath
)
Parameters
- path
The directory path to create.
Return Value
A DirectoryInfo as specified by path.
Remarks
Any and all directories specified in path are created, unless they already exist or unless some part of path is invalid. The path parameter specifies a directory path, not a file path. If the directory already exists, this method does nothing. Creating a directory with only the colon (:) character is not supported, and will cause a NotSupportedException to be thrown.
Version Information
Available in the .NET Micro Framework versions 3.0, 4.0, and 4.1.