Click or drag to resize
Galactic API

DirectoryGiveAccess Method (Byte, String, DirectorySecurity, FileSystemRights, Boolean, Boolean, Boolean)

Gives access to the account with the supplied security identifier on 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(
	byte[] accountSid,
	string path,
	ref DirectorySecurity security,
	FileSystemRights rights,
	bool applyToSubfolders,
	bool applyToFiles,
	bool commitChanges
)

Parameters

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.
rights
Type: System.Security.AccessControlFileSystemRights
The access rights to grant on the target directory.
applyToSubfolders
Type: SystemBoolean
Indicates whether this directory's permissions apply to subfolders beneath it.
applyToFiles
Type: SystemBoolean
Indicates whether this directory's permissions apply to files beneath it.
commitChanges
Type: SystemBoolean
Indicates whether changes should be commited to this directory. Useful when combining multiple commands.

Return Value

Type: Boolean
True if access was granted. False otherwise.
See Also