Share via


CreateSubdirectory Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the DirectoryInfo class.

Namespace:  System.IO
Assembly:  System.IO (in System.IO.dll)

Syntax

'Declaration
Public Function CreateSubdirectory ( _
    path As String _
) As DirectoryInfo
public DirectoryInfo CreateSubdirectory(
    string path
)
public:
DirectoryInfo^ CreateSubdirectory(
    String^ path
)
member CreateSubdirectory : 
        path:string -> DirectoryInfo 
public function CreateSubdirectory(
    path : String
) : DirectoryInfo

Parameters

  • path
    Type: System. . :: . .String
    The specified path. This cannot be a different disk volume or Universal Naming Convention (UNC) name.

Return Value

Type: System.IO. . :: . .DirectoryInfo
The last directory specified in path.

Remarks

Any and all directories specified in path are created, unless some part of path is invalid. The path parameter specifies a directory path, not a file path. If the subdirectory already exists, this method does nothing.

.NET Framework Security

See Also

Reference

DirectoryInfo Class

System.IO Namespace