Creates a subdirectory of the specified directory.
[Visual Basic] Public Function CreateSubdirectory( _ ByVal dirName As String _ ) As Directory [C#] public Directory CreateSubdirectory( string dirName ); [C++] public: Directory* CreateSubdirectory( String* dirName ); [JScript] public function CreateSubdirectory( dirName : String ) : Directory;
The new subdirectory.
Exception Type | Condition |
---|---|
ArgumentException | path does not specify a valid file path. |
ArgumentNullException | path is null. |
DirectoryNotFoundException | Part of the directory is not found. |
IOException | A file or directory already has the name specified by path. |
PathTooLongException | The specified path is too long. |
SecurityException | The caller does not have the required permission. |
Note Path names are limited to 248 characters.
NGWS Runtime Security:
FileIOPermissionAccess | Write flag required for write permission to the path. |
Directory Class | Directory Members | System.IO Namespace | CreateDirectory | CreateSubdirectories