System.IO.DirectoryInfo.CreateSubdirectory Method

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

Syntax

public DirectoryInfo CreateSubdirectory (string path, System.Security.AccessControl.DirectorySecurity directorySecurity)

Parameters

path
The specified path. This cannot be a different disk volume or Universal Naming Convention (UNC) name.
directorySecurity
The security to apply.

Returns

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.

Note:

Path names are limited to 248 characters.

For a list of common I/O tasks, see Common I/O Tasks.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0