C# DirectoryInfo DirectoryInfo
Description
DirectoryInfo DirectoryInfo
Initializes a new instance
of the DirectoryInfo class on the specified path.
Syntax
DirectoryInfo.DirectoryInfo
has the following syntax.
public DirectoryInfo(
string path
)
Parameters
DirectoryInfo.DirectoryInfo
has the following parameters.
path
- A string specifying the path on which to create the DirectoryInfo.
Example
The following example uses this constructor to create the specified directory and subdirectory.
/* www .ja va 2 s. com*/
using System;
using System.IO;
class Test
{
public static void Main()
{
DirectoryInfo di1 = new DirectoryInfo(@"c:\MyDir");
di1.Create();
}
}