Click or drag to resize
DirectoryCreateDirectory Method (KernelTransaction, String, DirectorySecurity)
Creates all the directories in the specified path, unless the already exist, applying the specified Windows security.

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

Parameters

transaction
Type: Alphaleonis.Win32.FilesystemKernelTransaction
The transaction.
path
Type: SystemString
The directory to create.
directorySecurity
Type: System.Security.AccessControlDirectorySecurity
The access control to apply to the 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 parameter before creating the directory.
See Also