Click or drag to resize
Galactic API

DirectoryAddAccessRule Method

Adds an access rule to the directory at the supplied path.

Namespace:  Galactic.FileSystem
Assembly:  Galactic.FileSystem (in Galactic.FileSystem.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax
public static bool AddAccessRule(
	string path,
	ref DirectorySecurity security,
	FileSystemAccessRule rule,
	bool commitChanges
)

Parameters

path
Type: SystemString
The path to the directory to add the rule to.
security
Type: System.Security.AccessControlDirectorySecurity
The DirectorySecurity object of the directory that will be changed.
rule
Type: System.Security.AccessControlFileSystemAccessRule
The rule to add to the directory.
commitChanges
Type: SystemBoolean
Indicates whether changes should be commited to this directory. Useful when combining multiple commands.

Return Value

Type: Boolean
True if the rule was added. False if the directory does not exist, the rule is null, or the process does not have access to the specified path, or does not have sufficient access to change the ACL entry of the directory, or the operating system is not Windows 2000 or later.
See Also