| DirectoryBlockInheritance Method |
Blocks inheritance on this directory.
Namespace:
Galactic.FileSystem
Assembly:
Galactic.FileSystem (in Galactic.FileSystem.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax public static bool BlockInheritance(
string path,
ref DirectorySecurity security,
bool addInheritedPermissions,
bool commitChanges
)
Public Shared Function BlockInheritance (
path As String,
ByRef security As DirectorySecurity,
addInheritedPermissions As Boolean,
commitChanges As Boolean
) As Boolean
public:
static bool BlockInheritance(
String^ path,
DirectorySecurity^% security,
bool addInheritedPermissions,
bool commitChanges
)
static member BlockInheritance :
path : string *
security : DirectorySecurity byref *
addInheritedPermissions : bool *
commitChanges : bool -> bool
Parameters
- path
- Type: SystemString
The path to the directory to block inheritance on. - security
- Type: System.Security.AccessControlDirectorySecurity
The DirectorySecurity object of the directory that will be changed. - addInheritedPermissions
- Type: SystemBoolean
If true, copies the directory's inherited permissions as explicit permissions on the directory. - commitChanges
- Type: SystemBoolean
Indicates whether changes should be commited to this entry. Useful when combining multiple commands.
Return Value
Type:
BooleanTrue if inheritance was blocked on the directory, false if the directory does not exist, or inheritance could not be
blocked.
See Also