DirectoryCreateDirectory Method (KernelTransaction, String, String, DirectorySecurity, PathFormat) |
[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.
Namespace: Alphaleonis.Win32.FilesystemAssembly: AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static DirectoryInfo CreateDirectory(
KernelTransaction transaction,
string path,
string templatePath,
DirectorySecurity directorySecurity,
PathFormat pathFormat
)
Public Shared Function CreateDirectory (
transaction As KernelTransaction,
path As String,
templatePath As String,
directorySecurity As DirectorySecurity,
pathFormat As PathFormat
) As DirectoryInfo
public:
static DirectoryInfo^ CreateDirectory(
KernelTransaction^ transaction,
String^ path,
String^ templatePath,
DirectorySecurity^ directorySecurity,
PathFormat pathFormat
)
static member CreateDirectory :
transaction : KernelTransaction *
path : string *
templatePath : string *
directorySecurity : DirectorySecurity *
pathFormat : PathFormat -> DirectoryInfo
Parameters
- transaction
- Type: Alphaleonis.Win32.FilesystemKernelTransaction
The transaction. - 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. - pathFormat
- Type: Alphaleonis.Win32.FilesystemPathFormat
Indicates the format of the path parameter(s).
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 Remarks MSDN: .NET 4+ Trailing spaces are removed from the end of the path and templatePath parameters before creating the directory.
See Also