directory class : CreateSubdirectory(string) method

Description

Create a subdirectory.

Syntax

directoryInstance.CreateSubdirectory(string subdirectoryName)

Arguments

ClassNameDescription
stringsubdirectoryNameName of the subdirectory.

Return value

ClassDescription
directorySubdirectory that has been created.

Sample code

1:

directory dir = new directory("c:\somewhere...");

2:

dir.Create();

3:

directory sub = dir.CreateSubdirectory("temp");

Notes

It's a wrapper of the System.IO.DirectoryInfo.CreateSubdirectory(string) method.

If the subdirectory already exists, this method does nothing.

Links for reference

Copyright © Cooker All rights reserved.