| DirectoryGiveAccess Method (DirectoryAccessRights, Byte, String, DirectorySecurity, Boolean) |
Gives the supplied data access rights to the account with the supplied security
identifier on the target directory. Applies inherited permissions to folders and
files beneath the target directory.
Namespace:
Galactic.FileSystem
Assembly:
Galactic.FileSystem (in Galactic.FileSystem.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax public static bool GiveAccess(
DirectoryAccessRights rights,
byte[] accountSid,
string path,
ref DirectorySecurity security,
bool commitChanges
)
Public Shared Function GiveAccess (
rights As DirectoryAccessRights,
accountSid As Byte(),
path As String,
ByRef security As DirectorySecurity,
commitChanges As Boolean
) As Boolean
public:
static bool GiveAccess(
DirectoryAccessRights rights,
array<unsigned char>^ accountSid,
String^ path,
DirectorySecurity^% security,
bool commitChanges
)
static member GiveAccess :
rights : DirectoryAccessRights *
accountSid : byte[] *
path : string *
security : DirectorySecurity byref *
commitChanges : bool -> bool
Parameters
- rights
- Type: Galactic.FileSystemDirectoryAccessRights
The rights to apply to the target directory. - accountSid
- Type: SystemByte
The security identifier (SID) of the account that should be given access. - path
- Type: SystemString
The path to the directory to have access granted on. - security
- Type: System.Security.AccessControlDirectorySecurity
The DirectorySecurity object of the directory that will be changed. - commitChanges
- Type: SystemBoolean
Indicates whether changes should be commited to this directory. Useful when combining multiple commands.
Return Value
Type:
BooleanTrue if access was granted. False otherwise.
See Also