Click or drag to resize
DirectoryCreateDirectory Method (String, String)
[AlphaFS] Creates a new directory, with the attributes of a specified template directory.

Namespace: Alphaleonis.Win32.Filesystem
Assembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax
public static DirectoryInfo CreateDirectory(
	string path,
	string templatePath
)

Parameters

path
Type: SystemString
The directory to create.
templatePath
Type: SystemString
The path of the directory to use as a template when creating the new directory.

Return Value

Type: DirectoryInfo
An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.
Exceptions
ExceptionCondition
ArgumentExceptionThe path parameter contains invalid characters, is empty, or contains only white spaces.
ArgumentNullException
DirectoryNotFoundException
IOException
NotSupportedException
UnauthorizedAccessException
Remarks
MSDN: .NET 4+ Trailing spaces are removed from the end of the path and templatePath parameters before creating the directory.
See Also