| 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
)
Public Shared Function AddAccessRule (
path As String,
ByRef security As DirectorySecurity,
rule As FileSystemAccessRule,
commitChanges As Boolean
) As Boolean
public:
static bool AddAccessRule(
String^ path,
DirectorySecurity^% security,
FileSystemAccessRule^ rule,
bool commitChanges
)
static member AddAccessRule :
path : string *
security : DirectorySecurity byref *
rule : FileSystemAccessRule *
commitChanges : bool -> bool
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:
BooleanTrue 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