DirectoryCreateDirectory Method (String, String, DirectorySecurity) |
[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.
Namespace:
Alphaleonis.Win32.Filesystem
Assembly:
AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static DirectoryInfo CreateDirectory(
string path,
string templatePath,
DirectorySecurity directorySecurity
)
Public Shared Function CreateDirectory (
path As String,
templatePath As String,
directorySecurity As DirectorySecurity
) As DirectoryInfo
public:
static DirectoryInfo^ CreateDirectory(
String^ path,
String^ templatePath,
DirectorySecurity^ directorySecurity
)
static member CreateDirectory :
path : string *
templatePath : string *
directorySecurity : DirectorySecurity -> DirectoryInfo
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. - directorySecurity
- Type: System.Security.AccessControlDirectorySecurity
The access control to apply to the directory.
Return Value
Type:
DirectoryInfoAn 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 See Also