DirectoryInfoCreateSubdirectory Method |
Creates a subdirectory or subdirectories on the specified path. The specified
path can be relative to this instance of the
DirectoryInfo class.
Namespace: Crestron.SimplSharp.CrestronIOAssembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntaxpublic DirectoryInfo CreateSubdirectory(
string dirPath
)
Parameters
- dirPath String
- Path to create the DirectoryInfo object.
This cannot be a different disk volume or Universal Naming Convention (UNC) name.
Return Value
DirectoryInfoThe last directory specified in path.
Exceptions
Example
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;;
public class CreateSubDirectory
{
public static void Main()
{
// Create a reference to a directory.
DirectoryInfo di = new DirectoryInfo("MyDirectory");
// Create a subdirectory in MyDirectory.
DirectoryInfo dis = di.CreateSubdirectory("MySubDirectory");
// Process that directory as required.
....
}
}
Version Information
.NET
Supported in: 6.0
.NET Compact Framework
Supported in: 3.5
See Also