An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.
Any and all directories specified in path are created, unless they already exist or unless some part of path is invalid. If the directory already exists, this method does not create a new directory, but it returns a System.IO.DirectoryInfo object for the existing directory.
The path parameter specifies a directory path, not a file path.
Trailing spaces are removed from the end of the path parameter before creating the directory.
You can create a directory on a remote computer, on a share that you have write access to. UNC paths are supported; for example, you can specify the following for path: \\2009\Archives\December in Visual Basic, and \\\\2009\\Archives\\December in C#.
Creating a directory with only the colon character (:) is not supported, and will cause a NotSupportedException to be thrown.